home *** CD-ROM | disk | FTP | other *** search
/ io Programmo 16 / IOPROG_16.ISO / soft / macaxsdk / macsdk.hqx / ActiveX DR3 SDK / ActiveX SDK / Control Common / DllEntry.cpp < prev    next >
MacBinary  |  1997-08-05  |  19.4 KB  |  [TEXT/CWIE]

open in: MacOS 8.1     |     Win98     |     DOS

browse contents    |     view JSON data     |     view as text


This file was processed as: MacBinary (archive/macBinary).

ConfidenceProgramDetectionMatch TypeSupport
10% dexvert MacBinary (archive/macBinary) fallback Supported
1% dexvert Text File (text/txt) fallback Supported
100% file MacBinary II, inited, Tue Aug 5 11:17:25 1997, modified Tue Aug 5 11:17:25 1997, creator 'CWIE', type ASCII, 19084 bytes "DllEntry.cpp" , at 0x4b0c 474 bytes resource default (weak)
99% file data default
74% TrID Macintosh plain text (MacBinary) default
25% TrID MacBinary 2 default (weak)
100% siegfried fmt/1762 MacBinary (II) default
100% lsar MacBinary default


id metadata
keyvalue
macFileType[TEXT]
macFileCreator[CWIE]



hex view
+--------+-------------------------+-------------------------+--------+--------+
|00000000| 00 0c 44 6c 6c 45 6e 74 | 72 79 2e 63 70 70 00 00 |..DllEnt|ry.cpp..|
|00000010| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000020| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000030| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000040| 00 54 45 58 54 43 57 49 | 45 01 00 00 00 00 00 00 |.TEXTCWI|E.......|
|00000050| 00 00 00 00 00 4a 8c 00 | 00 01 da b0 0c f4 85 b0 |.....J..|........|
|00000060| 0c f4 85 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00000070| 00 00 00 00 00 00 00 00 | 00 00 81 81 02 40 00 00 |........|.....@..|
|00000080| 2f 2f 0d 2f 2f 20 20 44 | 4c 4c 45 4e 54 52 59 2e |//.// D|LLENTRY.|
|00000090| 43 50 50 0d 2f 2f 0d 2f | 2f 20 3e 3e 3e 20 a9 20 |CPP.//./|/ >>> . |
|000000a0| 31 39 39 36 2d 31 39 39 | 37 20 4d 69 63 72 6f 73 |1996-199|7 Micros|
|000000b0| 6f 66 74 20 43 6f 72 70 | 6f 72 61 74 69 6f 6e 2e |oft Corp|oration.|
|000000c0| 20 20 41 6c 6c 20 72 69 | 67 68 74 73 20 72 65 73 | All ri|ghts res|
|000000d0| 65 72 76 65 64 2e 20 3c | 3c 3c 0d 2f 2f 0d 0d 23 |erved. <|<<.//..#|
|000000e0| 69 6e 63 6c 75 64 65 20 | 3c 73 74 64 69 6f 2e 68 |include |<stdio.h|
|000000f0| 3e 0d 23 69 6e 63 6c 75 | 64 65 20 22 41 58 43 6f |>.#inclu|de "AXCo|
|00000100| 6e 74 72 6f 6c 48 65 61 | 64 65 72 73 2e 68 22 0d |ntrolHea|ders.h".|
|00000110| 23 69 6e 63 6c 75 64 65 | 20 22 43 42 61 73 65 43 |#include| "CBaseC|
|00000120| 6f 6e 74 72 6f 6c 2e 68 | 22 0d 23 69 6e 63 6c 75 |ontrol.h|".#inclu|
|00000130| 64 65 20 22 64 6c 6c 65 | 6e 74 72 79 2e 68 22 0d |de "dlle|ntry.h".|
|00000140| 23 69 6e 63 6c 75 64 65 | 20 22 52 65 73 6f 75 72 |#include| "Resour|
|00000150| 63 65 4d 61 70 2e 68 22 | 0d 23 69 6e 63 6c 75 64 |ceMap.h"|.#includ|
|00000160| 65 20 22 43 4f 62 6a 65 | 63 74 44 65 73 63 2e 68 |e "CObje|ctDesc.h|
|00000170| 22 0d 0d 23 64 65 66 69 | 6e 65 20 49 4e 49 54 47 |"..#defi|ne INITG|
|00000180| 55 49 44 0d 23 69 6e 63 | 6c 75 64 65 20 3c 69 6e |UID.#inc|lude <in|
|00000190| 69 74 67 75 69 64 2e 68 | 3e 0d 0d 23 69 6e 63 6c |itguid.h|>..#incl|
|000001a0| 75 64 65 20 22 72 65 67 | 69 73 74 65 72 2e 68 22 |ude "reg|ister.h"|
|000001b0| 0d 09 0d 0d 23 70 72 61 | 67 6d 61 20 6d 61 72 6b |....#pra|gma mark|
|000001c0| 20 2d 2d 2d 2d 2d 2d 2d | 2d 20 4c 6f 63 61 6c 20 | -------|- Local |
|000001d0| 53 74 72 75 63 74 75 72 | 65 73 20 2d 2d 2d 2d 2d |Structur|es -----|
|000001e0| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 0d 0d 74 79 70 65 |--------|--..type|
|000001f0| 64 65 66 20 73 74 72 75 | 63 74 0d 7b 0d 09 43 46 |def stru|ct.{..CF|
|00000200| 72 61 67 49 6e 69 74 42 | 6c 6f 63 6b 09 09 49 6e |ragInitB|lock..In|
|00000210| 69 74 42 6c 6f 63 6b 3b | 09 2f 2f 20 43 46 4d 20 |itBlock;|.// CFM |
|00000220| 69 6e 69 74 20 42 6c 6f | 63 6b 0d 09 48 61 6e 64 |init Blo|ck..Hand|
|00000230| 6c 65 09 09 09 09 54 6f | 70 4d 61 70 48 64 6c 3b |le....To|pMapHdl;|
|00000240| 09 2f 2f 20 48 61 6e 64 | 6c 65 20 74 6f 20 74 68 |.// Hand|le to th|
|00000250| 65 20 74 6f 70 20 6f 66 | 20 74 68 65 20 72 65 73 |e top of| the res|
|00000260| 6f 75 72 63 65 20 6d 61 | 70 0d 09 75 6e 73 69 67 |ource ma|p..unsig|
|00000270| 6e 65 64 20 6c 6f 6e 67 | 09 09 52 65 66 54 68 69 |ned long|..RefThi|
|00000280| 73 44 6c 6c 3b 09 2f 2f | 20 44 4c 4c 20 52 65 66 |sDll;.//| DLL Ref|
|00000290| 20 63 6f 75 6e 74 09 0d | 09 42 6f 6f 6c 65 61 6e | count..|.Boolean|
|000002a0| 09 09 09 09 49 6e 69 74 | 65 64 3b 09 09 2f 2f 20 |....Init|ed;..// |
|000002b0| 54 72 75 65 20 69 66 20 | 77 65 27 76 65 20 62 65 |True if |we've be|
|000002c0| 65 6e 20 69 6e 69 74 65 | 64 0d 09 73 68 6f 72 74 |en inite|d..short|
|000002d0| 09 09 09 09 52 65 73 52 | 65 66 4e 75 6d 3b 09 2f |....ResR|efNum;./|
|000002e0| 2f 20 52 65 73 52 65 66 | 4e 75 6d 20 6f 66 20 74 |/ ResRef|Num of t|
|000002f0| 68 65 20 64 6c 6c 0d 7d | 0d 64 6c 6c 64 61 74 61 |he dll.}|.dlldata|
|00000300| 3b 0d 0d 73 74 61 74 69 | 63 20 64 6c 6c 64 61 74 |;..stati|c dlldat|
|00000310| 61 09 44 6c 6c 44 61 74 | 61 3b 0d 73 74 61 74 69 |a.DllDat|a;.stati|
|00000320| 63 20 55 49 6e 74 33 32 | 09 44 4c 4c 56 65 72 73 |c UInt32|.DLLVers|
|00000330| 69 6f 6e 3b 09 09 2f 2f | 20 68 6f 6c 64 73 20 44 |ion;..//| holds D|
|00000340| 4c 4c 27 73 20 76 65 72 | 73 69 6f 6e 20 6e 75 6d |LL's ver|sion num|
|00000350| 62 65 72 20 66 72 6f 6d | 20 72 65 73 6f 75 72 63 |ber from| resourc|
|00000360| 65 0d 0d 0d 0d 23 70 72 | 61 67 6d 61 20 6d 61 72 |e....#pr|agma mar|
|00000370| 6b 20 2d 2d 2d 2d 2d 2d | 2d 2d 20 4c 6f 63 61 6c |k ------|-- Local|
|00000380| 20 50 72 6f 74 6f 74 79 | 70 65 73 20 2d 2d 2d 2d | Prototy|pes ----|
|00000390| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 2d 2d 0d 0d 73 74 61 |--------|---..sta|
|000003a0| 74 69 63 20 70 61 73 63 | 61 6c 20 09 76 6f 69 64 |tic pasc|al .void|
|000003b0| 20 09 09 09 57 72 69 74 | 65 54 6f 4f 6c 65 52 65 | ...Writ|eToOleRe|
|000003c0| 67 20 28 63 68 61 72 20 | 2a 20 73 74 72 4b 65 79 |g (char |* strKey|
|000003d0| 2c 20 63 68 61 72 20 2a | 20 73 74 72 56 61 6c 75 |, char *| strValu|
|000003e0| 65 29 3b 0d 09 09 09 09 | 76 6f 69 64 20 09 09 09 |e);.....|void ...|
|000003f0| 47 65 74 31 49 6e 64 53 | 74 72 69 6e 67 28 53 74 |Get1IndS|tring(St|
|00000400| 72 32 35 35 20 74 68 65 | 53 74 72 69 6e 67 2c 20 |r255 the|String, |
|00000410| 73 68 6f 72 74 20 73 74 | 72 4c 69 73 74 49 44 2c |short st|rListID,|
|00000420| 20 73 68 6f 72 74 20 69 | 6e 64 65 78 29 3b 0d 73 | short i|ndex);.s|
|00000430| 74 61 74 69 63 20 09 09 | 09 41 58 45 72 72 6f 72 |tatic ..|.AXError|
|00000440| 43 6f 64 65 20 09 47 65 | 74 52 65 67 69 73 74 72 |Code .Ge|tRegistr|
|00000450| 79 4e 61 6d 65 73 28 49 | 6e 74 31 36 20 69 6e 52 |yNames(I|nt16 inR|
|00000460| 65 73 52 65 66 4e 75 6d | 2c 20 63 68 61 72 2a 20 |esRefNum|, char* |
|00000470| 6f 75 74 43 6c 61 73 73 | 49 44 2c 20 63 68 61 72 |outClass|ID, char|
|00000480| 2a 20 6f 75 74 50 72 6f | 67 49 44 2c 0d 09 09 09 |* outPro|gID,....|
|00000490| 09 09 09 09 09 09 09 09 | 09 63 68 61 72 2a 20 6f |........|.char* o|
|000004a0| 75 74 55 73 65 72 4e 61 | 6d 65 2c 20 63 68 61 72 |utUserNa|me, char|
|000004b0| 2a 20 6f 75 74 46 72 61 | 67 4e 61 6d 65 2c 20 49 |* outFra|gName, I|
|000004c0| 6e 74 31 36 2a 20 6f 75 | 74 4d 69 6d 65 52 65 73 |nt16* ou|tMimeRes|
|000004d0| 49 44 29 3b 0d 73 74 61 | 74 69 63 09 09 09 41 58 |ID);.sta|tic...AX|
|000004e0| 45 72 72 6f 72 43 6f 64 | 65 20 09 47 65 74 43 6c |ErrorCod|e .GetCl|
|000004f0| 61 73 73 49 44 28 43 4c | 53 49 44 2a 20 6f 75 74 |assID(CL|SID* out|
|00000500| 43 6c 61 73 73 49 44 29 | 3b 0d 73 74 61 74 69 63 |ClassID)|;.static|
|00000510| 20 09 09 09 49 4f 62 6a | 65 63 74 49 6e 66 6f 2a | ...IObj|ectInfo*|
|00000520| 20 09 47 65 74 4f 62 6a | 65 63 74 49 6e 66 6f 28 | .GetObj|ectInfo(|
|00000530| 49 6e 74 31 36 20 69 6e | 52 65 73 52 65 66 4e 75 |Int16 in|ResRefNu|
|00000540| 6d 2c 20 49 6e 74 31 36 | 2a 20 6f 75 74 4d 69 6d |m, Int16|* outMim|
|00000550| 65 52 65 73 49 44 29 3b | 0d 0d 0d 65 6e 75 6d 20 |eResID);|...enum |
|00000560| 0d 7b 0d 09 75 70 70 44 | 6c 6c 49 6e 69 74 52 6f |.{..uppD|llInitRo|
|00000570| 75 74 69 6e 65 50 72 6f | 63 49 6e 66 6f 20 3d 20 |utinePro|cInfo = |
|00000580| 6b 50 61 73 63 61 6c 53 | 74 61 63 6b 42 61 73 65 |kPascalS|tackBase|
|00000590| 64 0d 09 09 20 7c 20 52 | 45 53 55 4c 54 5f 53 49 |d... | R|ESULT_SI|
|000005a0| 5a 45 28 53 49 5a 45 5f | 43 4f 44 45 28 73 69 7a |ZE(SIZE_|CODE(siz|
|000005b0| 65 6f 66 28 4f 53 45 72 | 72 29 29 29 0d 09 09 20 |eof(OSEr|r)))... |
|000005c0| 7c 20 53 54 41 43 4b 5f | 52 4f 55 54 49 4e 45 5f || STACK_|ROUTINE_|
|000005d0| 50 41 52 41 4d 45 54 45 | 52 28 31 2c 20 53 49 5a |PARAMETE|R(1, SIZ|
|000005e0| 45 5f 43 4f 44 45 28 73 | 69 7a 65 6f 66 28 43 46 |E_CODE(s|izeof(CF|
|000005f0| 72 61 67 49 6e 69 74 42 | 6c 6f 63 6b 50 74 72 29 |ragInitB|lockPtr)|
|00000600| 29 29 0d 7d 3b 0d 0d 50 | 72 6f 63 49 6e 66 6f 54 |)).};..P|rocInfoT|
|00000610| 79 70 65 20 5f 5f 70 72 | 6f 63 69 6e 66 6f 20 3d |ype __pr|ocinfo =|
|00000620| 20 75 70 70 44 6c 6c 49 | 6e 69 74 52 6f 75 74 69 | uppDllI|nitRouti|
|00000630| 6e 65 50 72 6f 63 49 6e | 66 6f 3b 0d 0d 0d 65 78 |neProcIn|fo;...ex|
|00000640| 74 65 72 6e 20 22 43 22 | 20 0d 7b 0d 4f 53 45 72 |tern "C"| .{.OSEr|
|00000650| 72 20 70 61 73 63 61 6c | 20 5f 5f 69 6e 69 74 69 |r pascal| __initi|
|00000660| 61 6c 69 7a 65 28 43 46 | 72 61 67 49 6e 69 74 42 |alize(CF|ragInitB|
|00000670| 6c 6f 63 6b 50 74 72 20 | 69 6e 69 74 42 6c 6b 50 |lockPtr |initBlkP|
|00000680| 74 72 29 3b 0d 4f 53 45 | 72 72 20 70 61 73 63 61 |tr);.OSE|rr pasca|
|00000690| 6c 20 44 6c 6c 49 6e 69 | 74 69 61 6c 69 7a 61 74 |l DllIni|tializat|
|000006a0| 69 6f 6e 52 6f 75 74 69 | 6e 65 28 43 46 72 61 67 |ionRouti|ne(CFrag|
|000006b0| 49 6e 69 74 42 6c 6f 63 | 6b 50 74 72 20 69 6e 69 |InitBloc|kPtr ini|
|000006c0| 74 42 6c 6b 50 74 72 29 | 3b 0d 4f 53 45 72 72 20 |tBlkPtr)|;.OSErr |
|000006d0| 70 61 73 63 61 6c 20 44 | 6c 6c 45 78 65 63 75 74 |pascal D|llExecut|
|000006e0| 69 6f 6e 52 6f 75 74 69 | 6e 65 28 29 3b 0d 76 6f |ionRouti|ne();.vo|
|000006f0| 69 64 20 70 61 73 63 61 | 6c 20 5f 5f 74 65 72 6d |id pasca|l __term|
|00000700| 69 6e 61 74 65 28 29 3b | 0d 76 6f 69 64 20 70 61 |inate();|.void pa|
|00000710| 73 63 61 6c 20 44 6c 6c | 54 65 72 6d 69 6e 61 74 |scal Dll|Terminat|
|00000720| 69 6f 6e 52 6f 75 74 69 | 6e 65 28 29 3b 0d 7d 0d |ionRouti|ne();.}.|
|00000730| 0d 0d 23 70 72 61 67 6d | 61 20 6d 61 72 6b 20 2d |..#pragm|a mark -|
|00000740| 2d 2d 2d 2d 2d 2d 2d 20 | 43 6c 61 73 73 20 46 61 |------- |Class Fa|
|00000750| 63 74 6f 72 79 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |ctory --|--------|
|00000760| 2d 2d 2d 2d 2d 0d 0d 2f | 2f 0d 2f 2f 20 20 43 6c |-----../|/.// Cl|
|00000770| 61 73 73 20 46 61 63 74 | 6f 72 79 0d 2f 2f 0d 2f |ass Fact|ory.//./|
|00000780| 2f 20 20 43 6c 61 73 73 | 20 66 6f 72 20 63 72 65 |/ Class| for cre|
|00000790| 61 74 69 6e 67 20 61 6e | 20 69 6e 73 74 61 6e 63 |ating an| instanc|
|000007a0| 65 20 6f 66 20 74 68 65 | 20 63 6f 6e 74 72 6f 6c |e of the| control|
|000007b0| 20 63 6c 61 73 73 0d 2f | 2f 0d 0d 63 6c 61 73 73 | class./|/..class|
|000007c0| 20 43 43 6c 61 73 73 46 | 61 63 74 6f 72 79 3a 0d | CClassF|actory:.|
|000007d0| 20 20 20 20 70 75 62 6c | 69 63 20 49 43 6c 61 73 | publ|ic IClas|
|000007e0| 73 46 61 63 74 6f 72 79 | 0d 7b 0d 70 75 62 6c 69 |sFactory|.{.publi|
|000007f0| 63 3a 0d 20 20 20 20 2f | 2f 20 20 2a 2a 2a 20 43 |c:. /|/ *** C|
|00000800| 6f 6e 73 74 72 75 63 74 | 6f 72 2f 44 65 73 74 72 |onstruct|or/Destr|
|00000810| 75 63 74 6f 72 20 6d 65 | 74 68 6f 64 73 20 2a 2a |uctor me|thods **|
|00000820| 2a 0d 20 20 20 20 43 43 | 6c 61 73 73 46 61 63 74 |*. CC|lassFact|
|00000830| 6f 72 79 28 76 6f 69 64 | 29 3b 0d 20 20 20 20 7e |ory(void|);. ~|
|00000840| 43 43 6c 61 73 73 46 61 | 63 74 6f 72 79 28 76 6f |CClassFa|ctory(vo|
|00000850| 69 64 29 3b 0d 0d 20 20 | 20 20 2f 2f 20 20 2a 2a |id);.. | // **|
|00000860| 2a 20 49 55 6e 6b 6e 6f | 77 6e 20 6d 65 74 68 6f |* IUnkno|wn metho|
|00000870| 64 73 20 2a 2a 2a 0d 20 | 20 20 20 53 54 44 4d 45 |ds ***. | STDME|
|00000880| 54 48 4f 44 28 51 75 65 | 72 79 49 6e 74 65 72 66 |THOD(Que|ryInterf|
|00000890| 61 63 65 29 28 52 45 46 | 49 49 44 20 72 69 69 64 |ace)(REF|IID riid|
|000008a0| 2c 20 76 6f 69 64 2a 2a | 20 70 70 76 29 3b 0d 20 |, void**| ppv);. |
|000008b0| 20 20 20 53 54 44 4d 45 | 54 48 4f 44 5f 28 55 4c | STDME|THOD_(UL|
|000008c0| 4f 4e 47 2c 20 41 64 64 | 52 65 66 29 28 76 6f 69 |ONG, Add|Ref)(voi|
|000008d0| 64 29 3b 0d 20 20 20 20 | 53 54 44 4d 45 54 48 4f |d);. |STDMETHO|
|000008e0| 44 5f 28 55 4c 4f 4e 47 | 2c 20 52 65 6c 65 61 73 |D_(ULONG|, Releas|
|000008f0| 65 29 28 76 6f 69 64 29 | 3b 0d 0d 20 20 20 20 2f |e)(void)|;.. /|
|00000900| 2f 20 20 2a 2a 2a 20 49 | 43 6c 61 73 73 46 61 63 |/ *** I|ClassFac|
|00000910| 74 6f 72 79 20 6d 65 74 | 68 6f 64 73 20 2a 2a 2a |tory met|hods ***|
|00000920| 0d 20 20 20 20 53 54 44 | 4d 45 54 48 4f 44 28 43 |. STD|METHOD(C|
|00000930| 72 65 61 74 65 49 6e 73 | 74 61 6e 63 65 29 28 4c |reateIns|tance)(L|
|00000940| 50 55 4e 4b 4e 4f 57 4e | 20 70 55 6e 6b 4f 75 74 |PUNKNOWN| pUnkOut|
|00000950| 65 72 2c 20 52 45 46 49 | 49 44 20 72 69 69 64 2c |er, REFI|ID riid,|
|00000960| 20 76 6f 69 64 2a 2a 0d | 20 20 20 20 20 20 20 20 | void**.| |
|00000970| 70 70 76 4f 62 6a 65 63 | 74 29 3b 0d 20 20 20 20 |ppvObjec|t);. |
|00000980| 53 54 44 4d 45 54 48 4f | 44 28 4c 6f 63 6b 53 65 |STDMETHO|D(LockSe|
|00000990| 72 76 65 72 29 28 75 6e | 73 69 67 6e 65 64 20 6c |rver)(un|signed l|
|000009a0| 6f 6e 67 20 66 4c 6f 63 | 6b 29 3b 0d 0d 70 72 6f |ong fLoc|k);..pro|
|000009b0| 74 65 63 74 65 64 3a 0d | 20 20 20 20 55 4c 4f 4e |tected:.| ULON|
|000009c0| 47 20 6d 5f 63 52 65 66 | 3b 0d 0d 7d 3b 0d 0d 0d |G m_cRef|;..};...|
|000009d0| 2f 2f 0d 2f 2f 20 20 43 | 42 61 73 65 43 6c 61 73 |//.// C|BaseClas|
|000009e0| 73 46 61 63 74 6f 72 79 | 3a 3a 43 43 6c 61 73 73 |sFactory|::CClass|
|000009f0| 46 61 63 74 6f 72 79 0d | 2f 2f 0d 2f 2f 20 20 43 |Factory.|//.// C|
|00000a00| 6f 6e 73 74 72 75 63 74 | 6f 72 0d 2f 2f 0d 0d 43 |onstruct|or.//..C|
|00000a10| 43 6c 61 73 73 46 61 63 | 74 6f 72 79 3a 3a 43 43 |ClassFac|tory::CC|
|00000a20| 6c 61 73 73 46 61 63 74 | 6f 72 79 28 29 0d 7b 0d |lassFact|ory().{.|
|00000a30| 20 20 20 20 6d 5f 63 52 | 65 66 20 3d 20 31 3b 0d | m_cR|ef = 1;.|
|00000a40| 09 44 4c 4c 41 64 64 52 | 65 66 28 29 3b 0d 09 0d |.DLLAddR|ef();...|
|00000a50| 09 69 66 20 28 21 44 6c | 6c 44 61 74 61 2e 49 6e |.if (!Dl|lData.In|
|00000a60| 69 74 65 64 20 26 26 20 | 44 6c 6c 44 61 74 61 2e |ited && |DllData.|
|00000a70| 49 6e 69 74 42 6c 6f 63 | 6b 2e 66 72 61 67 4c 6f |InitBloc|k.fragLo|
|00000a80| 63 61 74 6f 72 2e 77 68 | 65 72 65 20 3d 3d 20 6b |cator.wh|ere == k|
|00000a90| 44 61 74 61 46 6f 72 6b | 43 46 72 61 67 4c 6f 63 |DataFork|CFragLoc|
|00000aa0| 61 74 6f 72 29 0d 09 7b | 0d 09 09 73 68 6f 72 74 |ator)..{|...short|
|00000ab0| 09 49 6e 52 65 73 46 69 | 6c 65 20 3d 20 3a 3a 43 |.InResFi|le = ::C|
|00000ac0| 75 72 52 65 73 46 69 6c | 65 28 29 3b 0d 09 09 48 |urResFil|e();...H|
|00000ad0| 61 6e 64 6c 65 09 49 6e | 54 6f 70 4d 61 70 48 64 |andle.In|TopMapHd|
|00000ae0| 6c 20 3d 20 3a 3a 4c 4d | 47 65 74 54 6f 70 4d 61 |l = ::LM|GetTopMa|
|00000af0| 70 48 6e 64 6c 28 29 3b | 0d 09 09 48 61 6e 64 6c |pHndl();|...Handl|
|00000b00| 65 09 68 52 65 73 6f 75 | 72 63 65 20 3d 20 4e 55 |e.hResou|rce = NU|
|00000b10| 4c 4c 3b 0d 0d 09 09 44 | 6c 6c 44 61 74 61 2e 49 |LL;....D|llData.I|
|00000b20| 6e 69 74 65 64 20 3d 20 | 74 72 75 65 3b 0d 09 09 |nited = |true;...|
|00000b30| 2f 2f 09 6f 70 65 6e 20 | 75 70 20 74 68 65 20 72 |//.open |up the r|
|00000b40| 65 73 6f 75 72 63 65 20 | 66 6f 72 6b 20 6f 66 20 |esource |fork of |
|00000b50| 74 68 65 20 64 6c 6c 20 | 61 6e 64 20 73 61 76 65 |the dll |and save|
|00000b60| 20 69 74 20 6f 66 66 0d | 09 09 44 6c 6c 44 61 74 | it off.|..DllDat|
|00000b70| 61 2e 52 65 73 52 65 66 | 4e 75 6d 20 3d 20 3a 3a |a.ResRef|Num = ::|
|00000b80| 46 53 70 4f 70 65 6e 52 | 65 73 46 69 6c 65 28 44 |FSpOpenR|esFile(D|
|00000b90| 6c 6c 44 61 74 61 2e 49 | 6e 69 74 42 6c 6f 63 6b |llData.I|nitBlock|
|00000ba0| 2e 66 72 61 67 4c 6f 63 | 61 74 6f 72 2e 75 2e 6f |.fragLoc|ator.u.o|
|00000bb0| 6e 44 69 73 6b 2e 66 69 | 6c 65 53 70 65 63 2c 20 |nDisk.fi|leSpec, |
|00000bc0| 66 73 52 64 50 65 72 6d | 29 3b 0d 09 09 44 6c 6c |fsRdPerm|);...Dll|
|00000bd0| 44 61 74 61 2e 54 6f 70 | 4d 61 70 48 64 6c 20 3d |Data.Top|MapHdl =|
|00000be0| 20 3a 3a 4c 4d 47 65 74 | 54 6f 70 4d 61 70 48 6e | ::LMGet|TopMapHn|
|00000bf0| 64 6c 28 29 3b 0d 0d 09 | 09 68 52 65 73 6f 75 72 |dl();...|.hResour|
|00000c00| 63 65 20 3d 20 47 65 74 | 31 52 65 73 6f 75 72 63 |ce = Get|1Resourc|
|00000c10| 65 28 27 76 65 72 73 27 | 2c 20 31 29 3b 0d 09 09 |e('vers'|, 1);...|
|00000c20| 0d 09 09 69 66 20 28 68 | 52 65 73 6f 75 72 63 65 |...if (h|Resource|
|00000c30| 20 26 26 20 47 65 74 48 | 61 6e 64 6c 65 53 69 7a | && GetH|andleSiz|
|00000c40| 65 28 68 52 65 73 6f 75 | 72 63 65 29 20 3e 20 73 |e(hResou|rce) > s|
|00000c50| 69 7a 65 6f 66 28 55 49 | 6e 74 33 32 29 29 0d 09 |izeof(UI|nt32))..|
|00000c60| 09 7b 0d 09 09 09 2f 2f | 20 20 45 78 74 72 61 63 |.{....//| Extrac|
|00000c70| 74 20 74 68 65 20 76 65 | 72 73 69 6f 6e 20 6e 75 |t the ve|rsion nu|
|00000c80| 6d 62 65 72 20 66 72 6f | 6d 20 74 68 65 20 72 65 |mber fro|m the re|
|00000c90| 73 6f 75 72 63 65 2c 20 | 73 74 72 69 70 70 69 6e |source, |strippin|
|00000ca0| 67 20 6f 66 66 0d 09 09 | 09 2f 2f 20 20 74 68 65 |g off...|.// the|
|00000cb0| 20 72 65 6c 65 61 73 65 | 20 73 74 61 67 65 20 62 | release| stage b|
|00000cc0| 79 74 65 2e 0d 09 09 09 | 44 4c 4c 56 65 72 73 69 |yte.....|DLLVersi|
|00000cd0| 6f 6e 20 3d 20 28 2a 28 | 28 4c 50 44 57 4f 52 44 |on = (*(|(LPDWORD|
|00000ce0| 29 28 2a 68 52 65 73 6f | 75 72 63 65 29 29 29 20 |)(*hReso|urce))) |
|00000cf0| 26 20 30 78 46 46 46 46 | 30 30 46 46 3b 0d 09 09 |& 0xFFFF|00FF;...|
|00000d00| 7d 0d 09 09 69 66 28 68 | 52 65 73 6f 75 72 63 65 |}...if(h|Resource|
|00000d10| 29 0d 09 09 09 52 65 6c | 65 61 73 65 52 65 73 6f |)....Rel|easeReso|
|00000d20| 75 72 63 65 28 68 52 65 | 73 6f 75 72 63 65 29 3b |urce(hRe|source);|
|00000d30| 0d 0d 09 09 3a 3a 55 73 | 65 52 65 73 46 69 6c 65 |....::Us|eResFile|
|00000d40| 28 49 6e 52 65 73 46 69 | 6c 65 29 3b 0d 09 09 3a |(InResFi|le);...:|
|00000d50| 3a 4c 4d 53 65 74 54 6f | 70 4d 61 70 48 6e 64 6c |:LMSetTo|pMapHndl|
|00000d60| 28 49 6e 54 6f 70 4d 61 | 70 48 64 6c 29 3b 0d 09 |(InTopMa|pHdl);..|
|00000d70| 7d 0d 7d 0d 0d 2f 2f 0d | 2f 2f 20 20 43 43 6c 61 |}.}..//.|// CCla|
|00000d80| 73 73 46 61 63 74 6f 72 | 79 3a 3a 7e 43 43 6c 61 |ssFactor|y::~CCla|
|00000d90| 73 73 46 61 63 74 6f 72 | 79 0d 2f 2f 0d 2f 2f 20 |ssFactor|y.//.// |
|00000da0| 20 44 65 73 74 72 75 63 | 74 6f 72 0d 2f 2f 0d 0d | Destruc|tor.//..|
|00000db0| 43 43 6c 61 73 73 46 61 | 63 74 6f 72 79 3a 3a 7e |CClassFa|ctory::~|
|00000dc0| 43 43 6c 61 73 73 46 61 | 63 74 6f 72 79 28 29 0d |CClassFa|ctory().|
|00000dd0| 7b 0d 09 44 4c 4c 52 65 | 6c 65 61 73 65 28 29 3b |{..DLLRe|lease();|
|00000de0| 0d 7d 0d 0d 2f 2f 0d 2f | 2f 20 20 43 43 6c 61 73 |.}..//./|/ CClas|
|00000df0| 73 46 61 63 74 6f 72 79 | 3a 3a 49 55 6e 6b 6e 6f |sFactory|::IUnkno|
|00000e00| 77 6e 3a 3a 51 75 65 72 | 79 49 6e 74 65 72 66 61 |wn::Quer|yInterfa|
|00000e10| 63 65 0d 2f 2f 0d 2f 2f | 20 20 52 65 74 75 72 6e |ce.//.//| Return|
|00000e20| 73 20 61 20 70 6f 69 6e | 74 65 72 20 74 6f 20 74 |s a poin|ter to t|
|00000e30| 68 65 20 73 70 65 63 69 | 66 69 65 64 20 69 6e 74 |he speci|fied int|
|00000e40| 65 72 66 61 63 65 20 6f | 6e 20 61 20 63 6f 6d 70 |erface o|n a comp|
|00000e50| 6f 6e 65 6e 74 20 74 6f | 20 77 68 69 63 68 20 61 |onent to| which a|
|00000e60| 0d 2f 2f 20 20 63 6c 69 | 65 6e 74 20 63 75 72 72 |.// cli|ent curr|
|00000e70| 65 6e 74 6c 79 20 68 6f | 6c 64 73 20 61 6e 20 69 |ently ho|lds an i|
|00000e80| 6e 74 65 72 66 61 63 65 | 20 70 6f 69 6e 74 65 72 |nterface| pointer|
|00000e90| 2e 0d 2f 2f 0d 0d 53 54 | 44 4d 45 54 48 4f 44 49 |..//..ST|DMETHODI|
|00000ea0| 4d 50 0d 43 43 6c 61 73 | 73 46 61 63 74 6f 72 79 |MP.CClas|sFactory|
|00000eb0| 3a 3a 51 75 65 72 79 49 | 6e 74 65 72 66 61 63 65 |::QueryI|nterface|
|00000ec0| 28 52 45 46 49 49 44 20 | 72 69 69 64 2c 20 76 6f |(REFIID |riid, vo|
|00000ed0| 69 64 2a 2a 20 70 70 76 | 29 0d 7b 0d 09 48 52 45 |id** ppv|).{..HRE|
|00000ee0| 53 55 4c 54 20 72 63 20 | 3d 20 30 3b 0d 09 0d 20 |SULT rc |= 0;... |
|00000ef0| 20 20 20 76 6f 69 64 2a | 20 70 76 3b 0d 0d 20 20 | void*| pv;.. |
|00000f00| 20 20 69 66 20 28 72 69 | 69 64 20 3d 3d 20 49 49 | if (ri|id == II|
|00000f10| 44 5f 49 55 6e 6b 6e 6f | 77 6e 20 7c 7c 20 72 69 |D_IUnkno|wn || ri|
|00000f20| 69 64 20 3d 3d 20 49 49 | 44 5f 49 43 6c 61 73 73 |id == II|D_IClass|
|00000f30| 46 61 63 74 6f 72 79 29 | 0d 20 20 20 20 20 20 20 |Factory)|. |
|00000f40| 20 70 76 20 3d 20 28 76 | 6f 69 64 2a 29 28 4c 50 | pv = (v|oid*)(LP|
|00000f50| 43 4c 41 53 53 46 41 43 | 54 4f 52 59 29 20 74 68 |CLASSFAC|TORY) th|
|00000f60| 69 73 3b 0d 20 20 20 20 | 65 6c 73 65 20 7b 0d 20 |is;. |else {. |
|00000f70| 20 20 20 20 20 20 20 2a | 70 70 76 20 3d 20 4e 55 | *|ppv = NU|
|00000f80| 4c 4c 3b 0d 20 20 20 20 | 20 20 20 20 72 63 20 3d |LL;. | rc =|
|00000f90| 20 45 5f 4e 4f 49 4e 54 | 45 52 46 41 43 45 3b 0d | E_NOINT|ERFACE;.|
|00000fa0| 20 20 20 20 20 20 20 20 | 67 6f 74 6f 20 44 6f 6e | |goto Don|
|00000fb0| 65 3b 0d 20 20 20 20 7d | 0d 0d 20 20 20 20 2a 70 |e;. }|.. *p|
|00000fc0| 70 76 20 3d 20 70 76 3b | 0d 20 20 20 20 28 28 4c |pv = pv;|. ((L|
|00000fd0| 50 55 4e 4b 4e 4f 57 4e | 29 20 70 76 29 2d 3e 41 |PUNKNOWN|) pv)->A|
|00000fe0| 64 64 52 65 66 28 29 3b | 0d 20 20 20 20 72 63 20 |ddRef();|. rc |
|00000ff0| 3d 20 20 53 5f 4f 4b 3b | 0d 0d 44 6f 6e 65 3a 0d |= S_OK;|..Done:.|
|00001000| 09 72 65 74 75 72 6e 20 | 72 63 3b 0d 7d 0d 0d 2f |.return |rc;.}../|
|00001010| 2f 0d 2f 2f 20 20 43 43 | 6c 61 73 73 46 61 63 74 |/.// CC|lassFact|
|00001020| 6f 72 79 3a 3a 49 55 6e | 6b 6e 6f 77 6e 3a 3a 41 |ory::IUn|known::A|
|00001030| 64 64 52 65 66 0d 2f 2f | 0d 2f 2f 20 20 49 6e 63 |ddRef.//|.// Inc|
|00001040| 72 65 6d 65 6e 74 73 20 | 74 68 65 20 72 65 66 65 |rements |the refe|
|00001050| 72 65 6e 63 65 20 63 6f | 75 6e 74 20 66 6f 72 20 |rence co|unt for |
|00001060| 74 68 65 20 63 61 6c 6c | 69 6e 67 20 69 6e 74 65 |the call|ing inte|
|00001070| 72 66 61 63 65 2e 0d 2f | 2f 0d 0d 53 54 44 4d 45 |rface../|/..STDME|
|00001080| 54 48 4f 44 49 4d 50 5f | 28 55 4c 4f 4e 47 29 0d |THODIMP_|(ULONG).|
|00001090| 43 43 6c 61 73 73 46 61 | 63 74 6f 72 79 3a 3a 41 |CClassFa|ctory::A|
|000010a0| 64 64 52 65 66 28 76 6f | 69 64 29 0d 7b 0d 20 20 |ddRef(vo|id).{. |
|000010b0| 20 20 72 65 74 75 72 6e | 20 2b 2b 6d 5f 63 52 65 | return| ++m_cRe|
|000010c0| 66 3b 0d 7d 0d 0d 2f 2f | 0d 2f 2f 20 20 43 43 6c |f;.}..//|.// CCl|
|000010d0| 61 73 73 46 61 63 74 6f | 72 79 3a 3a 49 55 6e 6b |assFacto|ry::IUnk|
|000010e0| 6e 6f 77 6e 3a 3a 52 65 | 6c 65 61 73 65 0d 2f 2f |nown::Re|lease.//|
|000010f0| 0d 2f 2f 20 20 44 65 63 | 72 65 6d 65 6e 74 73 20 |.// Dec|rements |
|00001100| 74 68 65 20 72 65 66 65 | 72 65 6e 63 65 20 63 6f |the refe|rence co|
|00001110| 75 6e 74 20 66 6f 72 20 | 74 68 65 20 63 61 6c 6c |unt for |the call|
|00001120| 69 6e 67 20 69 6e 74 65 | 72 66 61 63 65 20 6f 6e |ing inte|rface on|
|00001130| 20 61 20 6f 62 6a 65 63 | 74 2e 20 20 49 66 0d 2f | a objec|t. If./|
|00001140| 2f 20 20 74 68 65 20 72 | 65 66 65 72 65 6e 63 65 |/ the r|eference|
|00001150| 20 63 6f 75 6e 74 20 6f | 6e 20 74 68 65 20 6f 62 | count o|n the ob|
|00001160| 6a 65 63 74 20 66 61 6c | 6c 73 20 74 6f 20 7a 65 |ject fal|ls to ze|
|00001170| 72 6f 2c 20 74 68 65 20 | 6f 62 6a 65 63 74 20 69 |ro, the |object i|
|00001180| 73 20 66 72 65 65 64 2e | 0d 2f 2f 0d 0d 53 54 44 |s freed.|.//..STD|
|00001190| 4d 45 54 48 4f 44 49 4d | 50 5f 28 55 4c 4f 4e 47 |METHODIM|P_(ULONG|
|000011a0| 29 0d 43 43 6c 61 73 73 | 46 61 63 74 6f 72 79 3a |).CClass|Factory:|
|000011b0| 3a 52 65 6c 65 61 73 65 | 28 76 6f 69 64 29 0d 7b |:Release|(void).{|
|000011c0| 0d 20 20 20 20 69 66 20 | 28 2d 2d 6d 5f 63 52 65 |. if |(--m_cRe|
|000011d0| 66 20 21 3d 20 30 29 0d | 20 20 20 20 20 20 20 20 |f != 0).| |
|000011e0| 72 65 74 75 72 6e 20 6d | 5f 63 52 65 66 3b 0d 0d |return m|_cRef;..|
|000011f0| 20 20 20 20 64 65 6c 65 | 74 65 20 74 68 69 73 3b | dele|te this;|
|00001200| 0d 20 20 20 20 72 65 74 | 75 72 6e 20 30 3b 0d 7d |. ret|urn 0;.}|
|00001210| 0d 0d 2f 2f 0d 2f 2f 20 | 20 43 43 6c 61 73 73 46 |..//.// | CClassF|
|00001220| 61 63 74 6f 72 79 3a 3a | 49 43 6c 61 73 73 46 61 |actory::|IClassFa|
|00001230| 63 74 6f 72 79 3a 3a 52 | 65 6c 65 61 73 65 0d 2f |ctory::R|elease./|
|00001240| 2f 0d 2f 2f 20 20 44 65 | 63 72 65 6d 65 6e 74 73 |/.// De|crements|
|00001250| 20 74 68 65 20 72 65 66 | 65 72 65 6e 63 65 20 63 | the ref|erence c|
|00001260| 6f 75 6e 74 20 66 6f 72 | 20 74 68 65 20 63 61 6c |ount for| the cal|
|00001270| 6c 69 6e 67 20 69 6e 74 | 65 72 66 61 63 65 20 6f |ling int|erface o|
|00001280| 6e 20 61 20 6f 62 6a 65 | 63 74 2e 20 20 49 66 0d |n a obje|ct. If.|
|00001290| 2f 2f 20 20 74 68 65 20 | 72 65 66 65 72 65 6e 63 |// the |referenc|
|000012a0| 65 20 63 6f 75 6e 74 20 | 6f 6e 20 74 68 65 20 6f |e count |on the o|
|000012b0| 62 6a 65 63 74 20 66 61 | 6c 6c 73 20 74 6f 20 7a |bject fa|lls to z|
|000012c0| 65 72 6f 2c 20 74 68 65 | 20 6f 62 6a 65 63 74 20 |ero, the| object |
|000012d0| 69 73 20 66 72 65 65 64 | 2e 0d 2f 2f 0d 0d 53 54 |is freed|..//..ST|
|000012e0| 44 4d 45 54 48 4f 44 49 | 4d 50 0d 43 43 6c 61 73 |DMETHODI|MP.CClas|
|000012f0| 73 46 61 63 74 6f 72 79 | 3a 3a 43 72 65 61 74 65 |sFactory|::Create|
|00001300| 49 6e 73 74 61 6e 63 65 | 28 4c 50 55 4e 4b 4e 4f |Instance|(LPUNKNO|
|00001310| 57 4e 20 70 55 6e 6b 4f | 75 74 65 72 2c 20 52 45 |WN pUnkO|uter, RE|
|00001320| 46 49 49 44 20 72 69 69 | 64 2c 20 76 6f 69 64 2a |FIID rii|d, void*|
|00001330| 2a 20 70 70 76 4f 62 6a | 65 63 74 29 0d 7b 0d 23 |* ppvObj|ect).{.#|
|00001340| 70 72 61 67 6d 61 20 75 | 6e 75 73 65 64 20 28 70 |pragma u|nused (p|
|00001350| 55 6e 6b 4f 75 74 65 72 | 29 0d 20 20 20 20 48 52 |UnkOuter|). HR|
|00001360| 45 53 55 4c 54 20 09 68 | 72 3b 0d 20 20 20 20 49 |ESULT .h|r;. I|
|00001370| 55 6e 6b 6e 6f 77 6e 2a | 20 09 70 43 6f 6e 74 72 |Unknown*| .pContr|
|00001380| 6f 6c 3b 0d 20 20 20 0d | 23 69 66 64 65 66 20 55 |ol;. .|#ifdef U|
|00001390| 52 4c 4d 4f 4e 5f 44 4c | 4c 0d 20 20 20 20 70 43 |RLMON_DL|L. pC|
|000013a0| 6f 6e 74 72 6f 6c 20 3d | 20 28 49 55 6e 6b 6e 6f |ontrol =| (IUnkno|
|000013b0| 77 6e 2a 29 20 28 49 4d | 6f 6e 69 6b 65 72 2a 29 |wn*) (IM|oniker*)|
|000013c0| 20 6e 65 77 20 43 58 55 | 52 4c 4d 6f 6e 69 6b 65 | new CXU|RLMonike|
|000013d0| 72 28 4e 55 4c 4c 29 3b | 0d 23 65 6c 73 65 0d 20 |r(NULL);|.#else. |
|000013e0| 20 20 20 70 43 6f 6e 74 | 72 6f 6c 20 3d 20 28 49 | pCont|rol = (I|
|000013f0| 55 6e 6b 6e 6f 77 6e 2a | 29 20 28 49 43 6f 6e 74 |Unknown*|) (ICont|
|00001400| 72 6f 6c 2a 29 20 6e 65 | 77 20 43 43 6f 6e 74 72 |rol*) ne|w CContr|
|00001410| 6f 6c 28 29 3b 0d 23 65 | 6e 64 69 66 0d 0d 20 20 |ol();.#e|ndif.. |
|00001420| 20 20 69 66 20 28 70 43 | 6f 6e 74 72 6f 6c 20 3d | if (pC|ontrol =|
|00001430| 3d 20 4e 55 4c 4c 29 20 | 0d 20 20 20 20 7b 0d 20 |= NULL) |. {. |
|00001440| 20 20 20 20 20 20 20 2a | 70 70 76 4f 62 6a 65 63 | *|ppvObjec|
|00001450| 74 20 3d 20 4e 55 4c 4c | 3b 0d 20 20 20 20 20 20 |t = NULL|;. |
|00001460| 20 20 72 65 74 75 72 6e | 20 45 5f 4f 55 54 4f 46 | return| E_OUTOF|
|00001470| 4d 45 4d 4f 52 59 3b 0d | 20 20 20 20 7d 0d 0d 20 |MEMORY;.| }.. |
|00001480| 20 20 20 68 72 20 3d 20 | 70 43 6f 6e 74 72 6f 6c | hr = |pControl|
|00001490| 2d 3e 51 75 65 72 79 49 | 6e 74 65 72 66 61 63 65 |->QueryI|nterface|
|000014a0| 28 72 69 69 64 2c 20 70 | 70 76 4f 62 6a 65 63 74 |(riid, p|pvObject|
|000014b0| 29 3b 0d 20 20 20 20 28 | 28 49 43 6f 6e 74 72 6f |);. (|(IContro|
|000014c0| 6c 2a 29 70 43 6f 6e 74 | 72 6f 6c 29 2d 3e 52 65 |l*)pCont|rol)->Re|
|000014d0| 6c 65 61 73 65 28 29 3b | 0d 20 20 20 20 0d 20 20 |lease();|. . |
|000014e0| 20 20 72 65 74 75 72 6e | 20 68 72 3b 0d 7d 0d 0d | return| hr;.}..|
|000014f0| 2f 2f 0d 2f 2f 20 20 43 | 43 6c 61 73 73 46 61 63 |//.// C|ClassFac|
|00001500| 74 6f 72 79 3a 3a 49 43 | 6c 61 73 73 46 61 63 74 |tory::IC|lassFact|
|00001510| 6f 72 79 3a 3a 4c 6f 63 | 6b 53 65 72 76 65 72 0d |ory::Loc|kServer.|
|00001520| 2f 2f 0d 2f 2f 20 20 44 | 65 63 72 65 6d 65 6e 74 |//.// D|ecrement|
|00001530| 73 20 74 68 65 20 72 65 | 66 65 72 65 6e 63 65 20 |s the re|ference |
|00001540| 63 6f 75 6e 74 20 66 6f | 72 20 74 68 65 20 63 61 |count fo|r the ca|
|00001550| 6c 6c 69 6e 67 20 69 6e | 74 65 72 66 61 63 65 20 |lling in|terface |
|00001560| 6f 6e 20 61 20 6f 62 6a | 65 63 74 2e 20 20 49 66 |on a obj|ect. If|
|00001570| 0d 2f 2f 20 20 74 68 65 | 20 72 65 66 65 72 65 6e |.// the| referen|
|00001580| 63 65 20 63 6f 75 6e 74 | 20 6f 6e 20 74 68 65 20 |ce count| on the |
|00001590| 6f 62 6a 65 63 74 20 66 | 61 6c 6c 73 20 74 6f 20 |object f|alls to |
|000015a0| 7a 65 72 6f 2c 20 74 68 | 65 20 6f 62 6a 65 63 74 |zero, th|e object|
|000015b0| 20 69 73 20 66 72 65 65 | 64 2e 0d 2f 2f 0d 0d 53 | is free|d..//..S|
|000015c0| 54 44 4d 45 54 48 4f 44 | 49 4d 50 0d 43 43 6c 61 |TDMETHOD|IMP.CCla|
|000015d0| 73 73 46 61 63 74 6f 72 | 79 3a 3a 4c 6f 63 6b 53 |ssFactor|y::LockS|
|000015e0| 65 72 76 65 72 28 75 6e | 73 69 67 6e 65 64 20 6c |erver(un|signed l|
|000015f0| 6f 6e 67 20 66 4c 6f 63 | 6b 29 0d 7b 0d 23 70 72 |ong fLoc|k).{.#pr|
|00001600| 61 67 6d 61 20 75 6e 75 | 73 65 64 20 28 66 4c 6f |agma unu|sed (fLo|
|00001610| 63 6b 29 0d 20 20 20 20 | 72 65 74 75 72 6e 20 45 |ck). |return E|
|00001620| 5f 4e 4f 54 49 4d 50 4c | 3b 0d 7d 0d 0d 23 70 72 |_NOTIMPL|;.}..#pr|
|00001630| 61 67 6d 61 20 6d 61 72 | 6b 20 2d 2d 2d 2d 2d 2d |agma mar|k ------|
|00001640| 2d 2d 20 45 78 70 6f 72 | 74 65 64 20 44 4c 4c 20 |-- Expor|ted DLL |
|00001650| 46 75 6e 63 74 69 6f 6e | 73 20 2d 2d 2d 2d 2d 2d |Function|s ------|
|00001660| 2d 2d 2d 2d 2d 2d 2d 2d | 2d 0d 0d 23 70 72 61 67 |--------|-..#prag|
|00001670| 6d 61 20 65 78 70 6f 72 | 74 20 6f 6e 0d 0d 2f 2f |ma expor|t on..//|
|00001680| 0d 2f 2f 20 20 44 6c 6c | 47 65 74 43 6c 61 73 73 |.// Dll|GetClass|
|00001690| 4f 62 6a 65 63 74 0d 2f | 2f 0d 2f 2f 20 20 43 61 |Object./|/.// Ca|
|000016a0| 6c 6c 65 64 20 62 79 20 | 43 4f 4d 20 74 6f 20 63 |lled by |COM to c|
|000016b0| 72 65 61 74 65 20 74 68 | 65 20 63 6c 61 73 73 20 |reate th|e class |
|000016c0| 66 61 63 74 6f 72 79 0d | 2f 2f 0d 0d 53 54 44 41 |factory.|//..STDA|
|000016d0| 50 49 0d 44 6c 6c 47 65 | 74 43 6c 61 73 73 4f 62 |PI.DllGe|tClassOb|
|000016e0| 6a 65 63 74 28 52 45 46 | 43 4c 53 49 44 20 72 63 |ject(REF|CLSID rc|
|000016f0| 6c 73 69 64 2c 20 52 45 | 46 49 49 44 20 72 69 69 |lsid, RE|FIID rii|
|00001700| 64 2c 20 76 6f 69 64 2a | 2a 20 70 70 76 29 0d 7b |d, void*|* ppv).{|
|00001710| 0d 0d 0d 20 20 20 20 48 | 52 45 53 55 4c 54 20 09 |... H|RESULT .|
|00001720| 09 68 72 3b 0d 20 20 20 | 20 43 43 6c 61 73 73 46 |.hr;. | CClassF|
|00001730| 61 63 74 6f 72 79 2a 20 | 09 70 63 66 3b 0d 20 20 |actory* |.pcf;. |
|00001740| 20 20 43 4c 53 49 44 09 | 09 09 43 6c 61 73 73 49 | CLSID.|..ClassI|
|00001750| 44 20 3d 20 43 4c 53 49 | 44 5f 4e 55 4c 4c 3b 09 |D = CLSI|D_NULL;.|
|00001760| 0d 0d 20 20 20 20 2a 70 | 70 76 20 3d 20 4e 55 4c |.. *p|pv = NUL|
|00001770| 4c 3b 0d 0d 09 47 65 74 | 43 6c 61 73 73 49 44 28 |L;...Get|ClassID(|
|00001780| 26 43 6c 61 73 73 49 44 | 29 3b 0d 09 0d 20 20 20 |&ClassID|);... |
|00001790| 20 69 66 20 28 49 73 45 | 71 75 61 6c 43 4c 53 49 | if (IsE|qualCLSI|
|000017a0| 44 28 72 63 6c 73 69 64 | 2c 20 43 6c 61 73 73 49 |D(rclsid|, ClassI|
|000017b0| 44 29 29 20 0d 20 20 20 | 20 7b 0d 20 20 20 20 20 |D)) . | {. |
|000017c0| 20 20 20 70 63 66 20 3d | 20 6e 65 77 20 43 43 6c | pcf =| new CCl|
|000017d0| 61 73 73 46 61 63 74 6f | 72 79 28 29 3b 0d 20 20 |assFacto|ry();. |
|000017e0| 20 20 20 20 20 20 69 66 | 20 28 70 63 66 20 21 3d | if| (pcf !=|
|000017f0| 20 4e 55 4c 4c 29 20 0d | 20 20 20 20 20 20 20 20 | NULL) .| |
|00001800| 7b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 68 72 |{. | hr|
|00001810| 20 3d 20 70 63 66 2d 3e | 51 75 65 72 79 49 6e 74 | = pcf->|QueryInt|
|00001820| 65 72 66 61 63 65 28 72 | 69 69 64 2c 20 70 70 76 |erface(r|iid, ppv|
|00001830| 29 3b 0d 20 20 20 20 20 | 20 20 20 20 20 20 20 70 |);. | p|
|00001840| 63 66 2d 3e 52 65 6c 65 | 61 73 65 28 29 3b 0d 20 |cf->Rele|ase();. |
|00001850| 20 20 20 20 20 20 20 7d | 20 0d 20 20 20 20 20 20 | }| . |
|00001860| 20 20 65 6c 73 65 20 0d | 20 20 20 20 20 20 20 20 | else .| |
|00001870| 7b 0d 20 20 20 20 20 20 | 20 20 20 20 20 20 68 72 |{. | hr|
|00001880| 20 3d 20 45 5f 4f 55 54 | 4f 46 4d 45 4d 4f 52 59 | = E_OUT|OFMEMORY|
|00001890| 3b 0d 20 20 20 20 20 20 | 20 20 7d 0d 20 20 20 20 |;. | }. |
|000018a0| 7d 20 0d 20 20 20 20 65 | 6c 73 65 20 0d 20 20 20 |} . e|lse . |
|000018b0| 20 7b 0d 20 20 20 20 20 | 20 20 20 68 72 20 3d 20 | {. | hr = |
|000018c0| 43 4c 41 53 53 5f 45 5f | 43 4c 41 53 53 4e 4f 54 |CLASS_E_|CLASSNOT|
|000018d0| 41 56 41 49 4c 41 42 4c | 45 3b 0d 20 20 20 20 7d |AVAILABL|E;. }|
|000018e0| 0d 0d 20 20 20 20 72 65 | 74 75 72 6e 20 68 72 3b |.. re|turn hr;|
|000018f0| 0d 7d 0d 0d 2f 2f 0d 2f | 2f 20 20 44 6c 6c 43 61 |.}..//./|/ DllCa|
|00001900| 6e 55 6e 6c 6f 61 64 4e | 6f 77 0d 2f 2f 0d 2f 2f |nUnloadN|ow.//.//|
|00001910| 20 20 44 65 74 65 72 6d | 69 6e 65 73 20 77 68 65 | Determ|ines whe|
|00001920| 74 68 65 72 20 74 68 65 | 20 64 6c 6c 20 63 61 6e |ther the| dll can|
|00001930| 20 62 65 20 75 6e 6c 6f | 61 64 65 64 20 79 65 74 | be unlo|aded yet|
|00001940| 0d 2f 2f 0d 0d 53 54 44 | 41 50 49 0d 44 6c 6c 43 |.//..STD|API.DllC|
|00001950| 61 6e 55 6e 6c 6f 61 64 | 4e 6f 77 28 76 6f 69 64 |anUnload|Now(void|
|00001960| 29 0d 7b 0d 20 20 20 20 | 72 65 74 75 72 6e 20 28 |).{. |return (|
|00001970| 44 6c 6c 44 61 74 61 2e | 52 65 66 54 68 69 73 44 |DllData.|RefThisD|
|00001980| 6c 6c 20 3d 3d 20 30 29 | 20 3f 20 53 5f 4f 4b 20 |ll == 0)| ? S_OK |
|00001990| 3a 20 53 5f 46 41 4c 53 | 45 3b 0d 7d 0d 0d 23 64 |: S_FALS|E;.}..#d|
|000019a0| 65 66 69 6e 65 09 6b 43 | 4c 53 49 44 43 6f 6e 73 |efine.kC|LSIDCons|
|000019b0| 74 09 09 09 22 43 4c 53 | 49 44 5c 5c 22 0d 23 64 |t..."CLS|ID\\".#d|
|000019c0| 65 66 69 6e 65 09 6b 49 | 4e 50 52 4f 43 53 45 52 |efine.kI|NPROCSER|
|000019d0| 56 45 52 43 6f 6e 73 74 | 09 22 5c 5c 49 6e 70 72 |VERConst|."\\Inpr|
|000019e0| 6f 63 53 65 72 76 65 72 | 22 0d 23 64 65 66 69 6e |ocServer|".#defin|
|000019f0| 65 09 6b 41 4c 49 41 53 | 43 6f 6e 73 74 09 09 09 |e.kALIAS|Const...|
|00001a00| 22 5c 5c 41 6c 69 61 73 | 22 0d 23 64 65 66 69 6e |"\\Alias|".#defin|
|00001a10| 65 09 6b 41 4c 53 32 43 | 6f 6e 73 74 09 09 09 22 |e.kALS2C|onst..."|
|00001a20| 41 4c 53 32 3a 22 0d 23 | 64 65 66 69 6e 65 20 6b |ALS2:".#|define k|
|00001a30| 52 65 67 69 73 74 65 72 | 4d 69 6d 65 09 09 22 4d |Register|Mime.."M|
|00001a40| 49 4d 45 5c 5c 44 61 74 | 61 62 61 73 65 5c 5c 43 |IME\\Dat|abase\\C|
|00001a50| 6f 6e 74 65 6e 74 20 54 | 79 70 65 5c 5c 22 0d 23 |ontent T|ype\\".#|
|00001a60| 64 65 66 69 6e 65 20 6b | 52 65 67 69 73 74 65 72 |define k|Register|
|00001a70| 45 78 74 09 09 22 45 78 | 74 65 6e 73 69 6f 6e 5c |Ext.."Ex|tension\|
|00001a80| 5c 44 61 74 61 62 61 73 | 65 5c 5c 22 0d 23 64 65 |\Databas|e\\".#de|
|00001a90| 66 69 6e 65 20 6b 43 6f | 6e 74 65 6e 74 54 79 70 |fine kCo|ntentTyp|
|00001aa0| 65 09 09 22 5c 5c 43 6f | 6e 74 65 6e 74 20 54 79 |e.."\\Co|ntent Ty|
|00001ab0| 70 65 22 0d 0d 0d 53 54 | 44 41 50 49 0d 44 6c 6c |pe"...ST|DAPI.Dll|
|00001ac0| 52 65 67 69 73 74 65 72 | 53 65 72 76 65 72 28 76 |Register|Server(v|
|00001ad0| 6f 69 64 29 0d 7b 0d 09 | 48 4b 45 59 09 09 68 4b |oid).{..|HKEY..hK|
|00001ae0| 65 79 3b 0d 09 63 68 61 | 72 09 09 4b 65 79 5b 32 |ey;..cha|r..Key[2|
|00001af0| 35 36 5d 3b 0d 09 63 68 | 61 72 09 09 44 61 74 61 |56];..ch|ar..Data|
|00001b00| 56 61 6c 75 65 5b 32 35 | 36 5d 3b 0d 09 53 43 4f |Value[25|6];..SCO|
|00001b10| 44 45 20 09 09 73 63 3b | 0d 09 75 6e 73 69 67 6e |DE ..sc;|..unsign|
|00001b20| 65 64 20 6c 6f 6e 67 09 | 41 6c 69 61 73 4c 65 6e |ed long.|AliasLen|
|00001b30| 67 74 68 3b 0d 0d 09 69 | 66 28 44 6c 6c 44 61 74 |gth;...i|f(DllDat|
|00001b40| 61 2e 49 6e 69 74 65 64 | 29 0d 09 20 20 20 20 72 |a.Inited|).. r|
|00001b50| 65 74 75 72 6e 20 45 5f | 46 41 49 4c 3b 0d 0d 09 |eturn E_|FAIL;...|
|00001b60| 2f 2f 20 55 6e 72 65 67 | 69 73 74 65 72 20 62 65 |// Unreg|ister be|
|00001b70| 66 6f 72 65 20 77 65 20 | 73 74 61 72 74 0d 09 44 |fore we |start..D|
|00001b80| 6c 6c 55 6e 72 65 67 69 | 73 74 65 72 53 65 72 76 |llUnregi|sterServ|
|00001b90| 65 72 28 29 3b 0d 09 0d | 09 2f 2f 20 4f 70 65 6e |er();...|.// Open|
|00001ba0| 20 74 68 65 20 72 65 73 | 6f 75 72 63 65 20 66 6f | the res|ource fo|
|00001bb0| 72 6b 20 6f 66 20 74 68 | 65 20 63 6f 6e 74 72 6f |rk of th|e contro|
|00001bc0| 6c 0d 09 73 68 6f 72 74 | 09 49 6e 52 65 73 46 69 |l..short|.InResFi|
|00001bd0| 6c 65 20 3d 20 3a 3a 43 | 75 72 52 65 73 46 69 6c |le = ::C|urResFil|
|00001be0| 65 28 29 3b 0d 09 73 68 | 6f 72 74 20 09 52 65 73 |e();..sh|ort .Res|
|00001bf0| 52 65 66 4e 75 6d 20 3d | 20 3a 3a 46 53 70 4f 70 |RefNum =| ::FSpOp|
|00001c00| 65 6e 52 65 73 46 69 6c | 65 28 44 6c 6c 44 61 74 |enResFil|e(DllDat|
|00001c10| 61 2e 49 6e 69 74 42 6c | 6f 63 6b 2e 66 72 61 67 |a.InitBl|ock.frag|
|00001c20| 4c 6f 63 61 74 6f 72 2e | 75 2e 6f 6e 44 69 73 6b |Locator.|u.onDisk|
|00001c30| 2e 66 69 6c 65 53 70 65 | 63 2c 20 66 73 52 64 50 |.fileSpe|c, fsRdP|
|00001c40| 65 72 6d 29 3b 0d 09 69 | 66 20 28 20 52 65 73 52 |erm);..i|f ( ResR|
|00001c50| 65 66 4e 75 6d 20 3c 20 | 30 20 29 0d 09 09 72 65 |efNum < |0 )...re|
|00001c60| 74 75 72 6e 20 45 5f 46 | 41 49 4c 3b 0d 09 0d 09 |turn E_F|AIL;....|
|00001c70| 2f 2f 20 47 65 74 20 74 | 68 65 20 72 65 67 69 73 |// Get t|he regis|
|00001c80| 74 72 79 20 6e 61 6d 65 | 73 20 77 65 20 77 69 6c |try name|s we wil|
|00001c90| 6c 20 6e 65 65 64 0d 09 | 63 68 61 72 09 43 6c 61 |l need..|char.Cla|
|00001ca0| 73 73 49 44 5b 32 35 36 | 5d 3b 0d 09 63 68 61 72 |ssID[256|];..char|
|00001cb0| 09 50 72 6f 67 49 44 5b | 32 35 36 5d 3b 0d 09 63 |.ProgID[|256];..c|
|00001cc0| 68 61 72 09 55 73 65 72 | 4e 61 6d 65 5b 32 35 36 |har.User|Name[256|
|00001cd0| 5d 3b 0d 09 63 68 61 72 | 09 46 72 61 67 4e 61 6d |];..char|.FragNam|
|00001ce0| 65 5b 32 35 36 5d 3b 0d | 09 49 6e 74 31 36 09 4d |e[256];.|.Int16.M|
|00001cf0| 69 6d 65 52 65 73 49 44 | 3b 0d 09 73 63 20 3d 20 |imeResID|;..sc = |
|00001d00| 47 65 74 52 65 67 69 73 | 74 72 79 4e 61 6d 65 73 |GetRegis|tryNames|
|00001d10| 28 52 65 73 52 65 66 4e | 75 6d 2c 20 43 6c 61 73 |(ResRefN|um, Clas|
|00001d20| 73 49 44 2c 20 50 72 6f | 67 49 44 2c 20 55 73 65 |sID, Pro|gID, Use|
|00001d30| 72 4e 61 6d 65 2c 20 46 | 72 61 67 4e 61 6d 65 2c |rName, F|ragName,|
|00001d40| 20 26 4d 69 6d 65 52 65 | 73 49 44 29 3b 0d 09 69 | &MimeRe|sID);..i|
|00001d50| 66 20 28 20 73 63 20 21 | 3d 20 53 5f 4f 4b 20 29 |f ( sc !|= S_OK )|
|00001d60| 0d 09 7b 0d 09 09 3a 3a | 55 73 65 52 65 73 46 69 |..{...::|UseResFi|
|00001d70| 6c 65 28 49 6e 52 65 73 | 46 69 6c 65 29 3b 0d 09 |le(InRes|File);..|
|00001d80| 09 3a 3a 43 6c 6f 73 65 | 52 65 73 46 69 6c 65 28 |.::Close|ResFile(|
|00001d90| 52 65 73 52 65 66 4e 75 | 6d 29 3b 0d 09 09 72 65 |ResRefNu|m);...re|
|00001da0| 74 75 72 6e 20 73 63 3b | 0d 09 7d 0d 09 0d 09 2f |turn sc;|..}..../|
|00001db0| 2f 20 43 68 65 63 6b 20 | 74 6f 20 73 65 65 20 69 |/ Check |to see i|
|00001dc0| 66 20 77 65 20 61 72 65 | 20 61 6c 72 65 61 64 79 |f we are| already|
|00001dd0| 20 72 65 67 69 73 74 65 | 72 65 64 0d 09 4b 65 79 | registe|red..Key|
|00001de0| 5b 30 5d 20 3d 20 27 5c | 30 27 3b 0d 09 73 74 72 |[0] = '\|0';..str|
|00001df0| 63 70 79 28 4b 65 79 2c | 20 6b 43 4c 53 49 44 43 |cpy(Key,| kCLSIDC|
|00001e00| 6f 6e 73 74 29 3b 0d 09 | 73 74 72 63 61 74 28 4b |onst);..|strcat(K|
|00001e10| 65 79 2c 20 43 6c 61 73 | 73 49 44 29 3b 0d 09 69 |ey, Clas|sID);..i|
|00001e20| 66 20 28 52 65 67 4f 70 | 65 6e 4b 65 79 28 48 4b |f (RegOp|enKey(HK|
|00001e30| 45 59 5f 43 4c 41 53 53 | 45 53 5f 52 4f 4f 54 2c |EY_CLASS|ES_ROOT,|
|00001e40| 20 4b 65 79 2c 20 26 68 | 4b 65 79 29 20 3d 3d 20 | Key, &h|Key) == |
|00001e50| 53 5f 4f 4b 29 20 0d 09 | 09 52 65 67 43 6c 6f 73 |S_OK) ..|.RegClos|
|00001e60| 65 4b 65 79 28 68 4b 65 | 79 29 3b 0d 09 65 6c 73 |eKey(hKe|y);..els|
|00001e70| 65 0d 09 7b 0d 09 09 41 | 6c 69 61 73 48 61 6e 64 |e..{...A|liasHand|
|00001e80| 6c 65 09 41 6c 69 61 73 | 48 3b 0d 09 09 48 4b 45 |le.Alias|H;...HKE|
|00001e90| 59 09 09 68 6b 65 79 20 | 3d 20 4e 55 4c 4c 3b 0d |Y..hkey |= NULL;.|
|00001ea0| 0d 09 09 2f 2f 20 72 65 | 67 69 73 74 65 72 20 74 |...// re|gister t|
|00001eb0| 68 65 20 63 6c 73 69 64 | 0d 09 09 57 72 69 74 65 |he clsid|...Write|
|00001ec0| 54 6f 4f 6c 65 52 65 67 | 28 4b 65 79 2c 20 55 73 |ToOleReg|(Key, Us|
|00001ed0| 65 72 4e 61 6d 65 29 3b | 0d 0d 09 09 4b 65 79 5b |erName);|....Key[|
|00001ee0| 30 5d 20 3d 20 27 5c 30 | 27 3b 0d 09 09 73 74 72 |0] = '\0|';...str|
|00001ef0| 63 70 79 28 4b 65 79 2c | 20 6b 43 4c 53 49 44 43 |cpy(Key,| kCLSIDC|
|00001f00| 6f 6e 73 74 29 3b 0d 09 | 09 73 74 72 63 61 74 28 |onst);..|.strcat(|
|00001f10| 4b 65 79 2c 20 43 6c 61 | 73 73 49 44 29 3b 0d 09 |Key, Cla|ssID);..|
|00001f20| 09 73 74 72 63 61 74 28 | 4b 65 79 2c 20 6b 49 4e |.strcat(|Key, kIN|
|00001f30| 50 52 4f 43 53 45 52 56 | 45 52 43 6f 6e 73 74 29 |PROCSERV|ERConst)|
|00001f40| 3b 0d 09 09 44 61 74 61 | 56 61 6c 75 65 5b 30 5d |;...Data|Value[0]|
|00001f50| 20 3d 20 27 5c 30 27 3b | 0d 09 09 73 74 72 63 70 | = '\0';|...strcp|
|00001f60| 79 28 44 61 74 61 56 61 | 6c 75 65 2c 20 6b 41 4c |y(DataVa|lue, kAL|
|00001f70| 53 32 43 6f 6e 73 74 29 | 3b 0d 09 09 73 74 72 63 |S2Const)|;...strc|
|00001f80| 61 74 28 44 61 74 61 56 | 61 6c 75 65 2c 20 46 72 |at(DataV|alue, Fr|
|00001f90| 61 67 4e 61 6d 65 29 3b | 0d 0d 09 09 2f 2f 20 72 |agName);|....// r|
|00001fa0| 65 67 69 73 74 65 72 20 | 61 73 20 49 6e 50 72 6f |egister |as InPro|
|00001fb0| 63 53 65 72 76 65 72 0d | 09 09 57 72 69 74 65 54 |cServer.|..WriteT|
|00001fc0| 6f 4f 6c 65 52 65 67 28 | 4b 65 79 2c 20 44 61 74 |oOleReg(|Key, Dat|
|00001fd0| 61 56 61 6c 75 65 29 3b | 0d 0d 09 09 3a 3a 4e 65 |aValue);|....::Ne|
|00001fe0| 77 41 6c 69 61 73 20 28 | 4e 55 4c 4c 2c 20 44 6c |wAlias (|NULL, Dl|
|00001ff0| 6c 44 61 74 61 2e 49 6e | 69 74 42 6c 6f 63 6b 2e |lData.In|itBlock.|
|00002000| 66 72 61 67 4c 6f 63 61 | 74 6f 72 2e 75 2e 6f 6e |fragLoca|tor.u.on|
|00002010| 44 69 73 6b 2e 66 69 6c | 65 53 70 65 63 2c 20 26 |Disk.fil|eSpec, &|
|00002020| 41 6c 69 61 73 48 29 3b | 0d 0d 09 09 69 66 28 28 |AliasH);|....if((|
|00002030| 41 6c 69 61 73 48 29 20 | 26 26 20 28 52 65 67 4f |AliasH) |&& (RegO|
|00002040| 70 65 6e 4b 65 79 28 48 | 4b 45 59 5f 43 4c 41 53 |penKey(H|KEY_CLAS|
|00002050| 53 45 53 5f 52 4f 4f 54 | 2c 20 4b 65 79 2c 20 26 |SES_ROOT|, Key, &|
|00002060| 68 6b 65 79 29 20 3d 3d | 20 45 52 52 4f 52 5f 53 |hkey) ==| ERROR_S|
|00002070| 55 43 43 45 53 53 29 29 | 0d 09 09 7b 0d 09 09 09 |UCCESS))|...{....|
|00002080| 41 6c 69 61 73 4c 65 6e | 67 74 68 20 3d 20 3a 3a |AliasLen|gth = ::|
|00002090| 47 65 74 48 61 6e 64 6c | 65 53 69 7a 65 28 48 61 |GetHandl|eSize(Ha|
|000020a0| 6e 64 6c 65 28 41 6c 69 | 61 73 48 29 29 3b 0d 09 |ndle(Ali|asH));..|
|000020b0| 09 09 0d 09 09 09 4b 65 | 79 5b 30 5d 20 3d 20 27 |......Ke|y[0] = '|
|000020c0| 5c 30 27 3b 0d 09 09 09 | 73 74 72 63 70 79 28 4b |\0';....|strcpy(K|
|000020d0| 65 79 2c 20 6b 43 4c 53 | 49 44 43 6f 6e 73 74 29 |ey, kCLS|IDConst)|
|000020e0| 3b 0d 09 09 09 73 74 72 | 63 61 74 28 4b 65 79 2c |;....str|cat(Key,|
|000020f0| 20 43 6c 61 73 73 49 44 | 29 3b 0d 09 09 09 73 74 | ClassID|);....st|
|00002100| 72 63 61 74 28 4b 65 79 | 2c 20 6b 49 4e 50 52 4f |rcat(Key|, kINPRO|
|00002110| 43 53 45 52 56 45 52 43 | 6f 6e 73 74 20 6b 41 4c |CSERVERC|onst kAL|
|00002120| 49 41 53 43 6f 6e 73 74 | 29 3b 0d 09 09 09 0d 09 |IASConst|);......|
|00002130| 09 09 2f 2f 20 72 65 67 | 69 73 74 65 72 20 74 68 |..// reg|ister th|
|00002140| 65 20 61 6c 69 61 73 20 | 64 61 74 61 0d 09 09 09 |e alias |data....|
|00002150| 73 63 20 3d 20 52 65 67 | 53 65 74 56 61 6c 75 65 |sc = Reg|SetValue|
|00002160| 45 78 28 68 6b 65 79 2c | 20 22 41 6c 69 61 73 22 |Ex(hkey,| "Alias"|
|00002170| 2c 20 30 2c 20 52 45 47 | 5f 42 49 4e 41 52 59 2c |, 0, REG|_BINARY,|
|00002180| 20 0d 09 09 09 09 28 63 | 68 61 72 2a 29 2a 41 6c | .....(c|har*)*Al|
|00002190| 69 61 73 48 2c 20 41 6c | 69 61 73 4c 65 6e 67 74 |iasH, Al|iasLengt|
|000021a0| 68 29 3b 0d 09 09 09 09 | 0d 09 09 09 52 65 67 43 |h);.....|....RegC|
|000021b0| 6c 6f 73 65 4b 65 79 28 | 68 6b 65 79 29 3b 0d 09 |loseKey(|hkey);..|
|000021c0| 09 7d 0d 23 69 66 64 65 | 66 20 6b 4f 43 58 46 75 |.}.#ifde|f kOCXFu|
|000021d0| 6c 6c 53 63 72 65 65 6e | 0d 09 09 4b 65 79 5b 30 |llScreen|...Key[0|
|000021e0| 5d 20 3d 20 27 5c 30 27 | 3b 0d 09 09 73 74 72 63 |] = '\0'|;...strc|
|000021f0| 61 74 28 4b 65 79 2c 20 | 6b 43 4c 53 49 44 43 6f |at(Key, |kCLSIDCo|
|00002200| 6e 73 74 20 43 6c 61 73 | 73 49 44 20 22 5c 5c 46 |nst Clas|sID "\\F|
|00002210| 75 6c 6c 53 63 72 65 65 | 6e 22 29 3b 0d 0d 09 09 |ullScree|n");....|
|00002220| 2f 2f 20 72 65 67 69 73 | 74 65 72 20 61 73 20 66 |// regis|ter as f|
|00002230| 75 6c 6c 20 73 63 72 65 | 65 6e 0d 09 09 57 72 69 |ull scre|en...Wri|
|00002240| 74 65 54 6f 4f 6c 65 52 | 65 67 28 4b 65 79 2c 20 |teToOleR|eg(Key, |
|00002250| 22 22 29 3b 0d 23 65 6e | 64 69 66 0d 09 09 4b 65 |"");.#en|dif...Ke|
|00002260| 79 5b 30 5d 20 3d 20 27 | 5c 30 27 3b 0d 09 09 73 |y[0] = '|\0';...s|
|00002270| 74 72 63 70 79 28 4b 65 | 79 2c 20 6b 43 4c 53 49 |trcpy(Ke|y, kCLSI|
|00002280| 44 43 6f 6e 73 74 29 3b | 0d 09 09 73 74 72 63 61 |DConst);|...strca|
|00002290| 74 28 4b 65 79 2c 20 43 | 6c 61 73 73 49 44 29 3b |t(Key, C|lassID);|
|000022a0| 0d 09 09 73 74 72 63 61 | 74 28 4b 65 79 2c 20 22 |...strca|t(Key, "|
|000022b0| 5c 5c 43 6f 6e 74 72 6f | 6c 22 29 3b 0d 0d 09 09 |\\Contro|l");....|
|000022c0| 2f 2f 20 72 65 67 69 73 | 74 65 72 20 61 73 20 41 |// regis|ter as A|
|000022d0| 63 74 69 76 65 58 20 63 | 6f 6e 74 72 6f 6c 0d 09 |ctiveX c|ontrol..|
|000022e0| 09 57 72 69 74 65 54 6f | 4f 6c 65 52 65 67 28 4b |.WriteTo|OleReg(K|
|000022f0| 65 79 2c 20 22 22 29 3b | 0d 0d 09 09 69 66 20 28 |ey, "");|....if (|
|00002300| 41 6c 69 61 73 48 29 0d | 09 09 09 3a 3a 44 69 73 |AliasH).|...::Dis|
|00002310| 70 6f 73 65 48 61 6e 64 | 6c 65 28 20 48 61 6e 64 |poseHand|le( Hand|
|00002320| 6c 65 28 41 6c 69 61 73 | 48 29 20 29 3b 0d 09 09 |le(Alias|H) );...|
|00002330| 0d 09 09 69 66 20 28 20 | 73 74 72 6c 65 6e 28 50 |...if ( |strlen(P|
|00002340| 72 6f 67 49 44 29 20 3e | 20 30 20 29 0d 09 09 7b |rogID) >| 0 )...{|
|00002350| 0d 09 09 09 69 66 28 4d | 69 6d 65 52 65 73 49 44 |....if(M|imeResID|
|00002360| 29 0d 09 09 09 7b 0d 09 | 09 09 09 2f 2f 20 72 65 |)....{..|...// re|
|00002370| 67 69 73 74 65 72 20 74 | 68 65 20 6d 69 6d 65 20 |gister t|he mime |
|00002380| 74 79 70 65 73 20 61 6e | 64 20 66 69 6c 65 20 65 |types an|d file e|
|00002390| 78 74 65 6e 74 69 6f 6e | 73 20 66 6f 72 20 61 20 |xtention|s for a |
|000023a0| 63 6f 6e 74 72 6f 6c 0d | 09 09 09 09 69 6e 74 09 |control.|....int.|
|000023b0| 09 69 20 3d 20 31 3b 0d | 0d 09 09 09 09 77 68 69 |.i = 1;.|.....whi|
|000023c0| 6c 65 28 54 52 55 45 29 | 0d 09 09 09 09 7b 0d 09 |le(TRUE)|.....{..|
|000023d0| 09 09 09 09 53 74 72 32 | 35 35 09 74 68 65 53 74 |....Str2|55.theSt|
|000023e0| 72 69 6e 67 3b 0d 09 09 | 09 09 09 53 74 72 32 35 |ring;...|...Str25|
|000023f0| 35 09 6d 69 6d 65 53 74 | 72 69 6e 67 3b 0d 09 09 |5.mimeSt|ring;...|
|00002400| 09 09 09 48 61 6e 64 6c | 65 09 53 74 72 69 6e 67 |...Handl|e.String|
|00002410| 52 65 73 20 3d 20 4e 55 | 4c 4c 3b 0d 09 09 09 09 |Res = NU|LL;.....|
|00002420| 09 0d 09 09 09 09 09 47 | 65 74 31 49 6e 64 53 74 |.......G|et1IndSt|
|00002430| 72 69 6e 67 28 74 68 65 | 53 74 72 69 6e 67 2c 20 |ring(the|String, |
|00002440| 4d 69 6d 65 52 65 73 49 | 44 2c 20 69 29 3b 0d 09 |MimeResI|D, i);..|
|00002450| 09 09 09 09 69 66 28 52 | 65 73 45 72 72 6f 72 28 |....if(R|esError(|
|00002460| 29 20 3d 3d 20 6e 6f 45 | 72 72 20 26 26 20 74 68 |) == noE|rr && th|
|00002470| 65 53 74 72 69 6e 67 5b | 30 5d 20 3e 20 30 29 0d |eString[|0] > 0).|
|00002480| 09 09 09 09 09 7b 0d 09 | 09 09 09 09 09 70 32 63 |.....{..|.....p2c|
|00002490| 73 74 72 28 74 68 65 53 | 74 72 69 6e 67 29 3b 0d |str(theS|tring);.|
|000024a0| 09 09 09 09 09 09 69 66 | 28 69 20 26 20 31 29 09 |......if|(i & 1).|
|000024b0| 09 2f 2f 20 6f 64 64 20 | 6e 75 6d 62 65 72 20 73 |.// odd |number s|
|000024c0| 74 72 69 6e 67 73 20 68 | 61 76 65 20 6d 69 6d 65 |trings h|ave mime|
|000024d0| 20 74 79 70 65 73 0d 09 | 09 09 09 09 09 7b 0d 09 | types..|.....{..|
|000024e0| 09 09 09 09 09 09 4b 65 | 79 5b 30 5d 20 3d 20 27 |......Ke|y[0] = '|
|000024f0| 5c 30 27 3b 0d 09 09 09 | 09 09 09 09 73 74 72 63 |\0';....|....strc|
|00002500| 61 74 28 4b 65 79 2c 20 | 6b 52 65 67 69 73 74 65 |at(Key, |kRegiste|
|00002510| 72 4d 69 6d 65 29 3b 0d | 09 09 09 09 09 09 09 73 |rMime);.|.......s|
|00002520| 74 72 63 61 74 28 4b 65 | 79 2c 20 28 63 68 61 72 |trcat(Ke|y, (char|
|00002530| 2a 29 74 68 65 53 74 72 | 69 6e 67 29 3b 0d 09 09 |*)theStr|ing);...|
|00002540| 09 09 09 09 09 73 74 72 | 63 61 74 28 4b 65 79 2c |.....str|cat(Key,|
|00002550| 20 22 5c 5c 43 4c 53 49 | 44 22 29 3b 0d 09 09 09 | "\\CLSI|D");....|
|00002560| 09 09 09 09 44 61 74 61 | 56 61 6c 75 65 5b 30 5d |....Data|Value[0]|
|00002570| 20 3d 20 27 5c 30 27 3b | 0d 09 09 09 09 09 09 09 | = '\0';|........|
|00002580| 0d 09 09 09 09 09 09 09 | 2f 2f 20 72 65 67 69 73 |........|// regis|
|00002590| 74 65 72 20 74 68 65 20 | 6d 69 6d 65 20 74 79 70 |ter the |mime typ|
|000025a0| 65 2f 63 6c 73 69 64 20 | 61 73 73 6f 63 69 61 74 |e/clsid |associat|
|000025b0| 69 6f 6e 0d 09 09 09 09 | 09 09 09 57 72 69 74 65 |ion.....|...Write|
|000025c0| 54 6f 4f 6c 65 52 65 67 | 28 4b 65 79 2c 20 43 6c |ToOleReg|(Key, Cl|
|000025d0| 61 73 73 49 44 29 3b 0d | 09 09 09 09 09 09 09 6d |assID);.|.......m|
|000025e0| 69 6d 65 53 74 72 69 6e | 67 5b 30 5d 20 3d 20 27 |imeStrin|g[0] = '|
|000025f0| 5c 30 27 3b 0d 09 09 09 | 09 09 09 09 73 74 72 63 |\0';....|....strc|
|00002600| 61 74 28 28 63 68 61 72 | 2a 29 6d 69 6d 65 53 74 |at((char|*)mimeSt|
|00002610| 72 69 6e 67 2c 20 28 63 | 68 61 72 2a 29 74 68 65 |ring, (c|har*)the|
|00002620| 53 74 72 69 6e 67 29 3b | 0d 09 09 09 09 09 09 7d |String);|.......}|
|00002630| 0d 09 09 09 09 09 09 65 | 6c 73 65 09 09 09 2f 2f |.......e|lse...//|
|00002640| 20 65 76 65 6e 20 6e 75 | 6d 62 65 72 20 73 74 72 | even nu|mber str|
|00002650| 69 6e 67 73 20 68 61 76 | 65 20 66 69 6c 65 20 65 |ings hav|e file e|
|00002660| 78 74 65 6e 74 69 6f 6e | 73 20 6c 69 73 74 73 0d |xtention|s lists.|
|00002670| 09 09 09 09 09 09 7b 0d | 09 09 09 09 09 09 09 4b |......{.|.......K|
|00002680| 65 79 5b 30 5d 20 3d 20 | 27 5c 30 27 3b 0d 09 09 |ey[0] = |'\0';...|
|00002690| 09 09 09 09 09 73 74 72 | 63 61 74 28 4b 65 79 2c |.....str|cat(Key,|
|000026a0| 20 6b 52 65 67 69 73 74 | 65 72 4d 69 6d 65 29 3b | kRegist|erMime);|
|000026b0| 0d 09 09 09 09 09 09 09 | 73 74 72 63 61 74 28 4b |........|strcat(K|
|000026c0| 65 79 2c 20 28 63 68 61 | 72 2a 29 6d 69 6d 65 53 |ey, (cha|r*)mimeS|
|000026d0| 74 72 69 6e 67 29 3b 0d | 09 09 09 09 09 09 09 73 |tring);.|.......s|
|000026e0| 74 72 63 61 74 28 4b 65 | 79 2c 20 22 5c 5c 45 78 |trcat(Ke|y, "\\Ex|
|000026f0| 74 65 6e 73 69 6f 6e 22 | 29 3b 0d 09 09 09 09 09 |tension"|);......|
|00002700| 09 09 44 61 74 61 56 61 | 6c 75 65 5b 30 5d 20 3d |..DataVa|lue[0] =|
|00002710| 20 27 5c 30 27 3b 0d 09 | 09 09 09 09 09 09 0d 09 | '\0';..|........|
|00002720| 09 09 09 09 09 09 2f 2f | 20 61 64 64 20 6d 69 6d |......//| add mim|
|00002730| 65 20 74 79 70 65 2f 65 | 78 74 65 6e 73 69 6f 6e |e type/e|xtension|
|00002740| 20 61 73 73 6f 63 69 61 | 74 69 6f 6e 73 20 74 6f | associa|tions to|
|00002750| 20 74 68 65 20 6d 69 6d | 65 20 74 79 70 65 20 64 | the mim|e type d|
|00002760| 61 74 61 62 61 73 65 0d | 09 09 09 09 09 09 09 57 |atabase.|.......W|
|00002770| 72 69 74 65 54 6f 4f 6c | 65 52 65 67 28 4b 65 79 |riteToOl|eReg(Key|
|00002780| 2c 20 28 63 68 61 72 2a | 29 74 68 65 53 74 72 69 |, (char*|)theStri|
|00002790| 6e 67 29 3b 0d 09 09 09 | 09 09 09 09 0d 09 09 09 |ng);....|........|
|000027a0| 09 09 09 09 4b 65 79 5b | 30 5d 20 3d 20 27 5c 30 |....Key[|0] = '\0|
|000027b0| 27 3b 0d 09 09 09 09 09 | 09 09 73 74 72 63 61 74 |';......|..strcat|
|000027c0| 28 4b 65 79 2c 20 6b 52 | 65 67 69 73 74 65 72 45 |(Key, kR|egisterE|
|000027d0| 78 74 29 3b 0d 09 09 09 | 09 09 09 09 73 74 72 63 |xt);....|....strc|
|000027e0| 61 74 28 4b 65 79 2c 20 | 28 63 68 61 72 2a 29 74 |at(Key, |(char*)t|
|000027f0| 68 65 53 74 72 69 6e 67 | 29 3b 0d 09 09 09 09 09 |heString|);......|
|00002800| 09 09 57 72 69 74 65 54 | 6f 4f 6c 65 52 65 67 28 |..WriteT|oOleReg(|
|00002810| 4b 65 79 2c 20 43 6c 61 | 73 73 49 44 29 3b 0d 0d |Key, Cla|ssID);..|
|00002820| 09 09 09 09 09 09 09 2f | 2f 20 61 64 64 20 65 78 |......./|/ add ex|
|00002830| 74 65 6e 73 69 6f 6e 2f | 70 72 6f 67 69 64 20 61 |tension/|progid a|
|00002840| 73 73 6f 63 69 61 74 69 | 6f 6e 73 20 74 6f 20 74 |ssociati|ons to t|
|00002850| 68 65 20 65 78 74 65 6e | 73 69 6f 6e 20 64 61 74 |he exten|sion dat|
|00002860| 61 62 61 73 65 0d 09 09 | 09 09 09 09 09 57 72 69 |abase...|.....Wri|
|00002870| 74 65 54 6f 4f 6c 65 52 | 65 67 28 28 63 68 61 72 |teToOleR|eg((char|
|00002880| 2a 29 74 68 65 53 74 72 | 69 6e 67 2c 20 50 72 6f |*)theStr|ing, Pro|
|00002890| 67 49 44 29 3b 0d 09 09 | 09 09 09 09 09 0d 09 09 |gID);...|........|
|000028a0| 09 09 09 09 09 2f 2f 20 | 72 65 67 69 73 74 65 72 |.....// |register|
|000028b0| 20 74 68 65 20 73 65 70 | 61 72 61 74 65 20 65 78 | the sep|arate ex|
|000028c0| 74 65 6e 73 69 6f 6e 2f | 6d 69 6d 65 20 74 79 70 |tension/|mime typ|
|000028d0| 65 20 61 73 73 6f 63 69 | 61 74 69 6f 6e 0d 09 09 |e associ|ation...|
|000028e0| 09 09 09 09 09 4b 65 79 | 5b 30 5d 20 3d 20 27 5c |.....Key|[0] = '\|
|000028f0| 30 27 3b 0d 09 09 09 09 | 09 09 09 73 74 72 63 61 |0';.....|...strca|
|00002900| 74 28 4b 65 79 2c 20 28 | 63 68 61 72 2a 29 74 68 |t(Key, (|char*)th|
|00002910| 65 53 74 72 69 6e 67 29 | 3b 0d 09 09 09 09 09 09 |eString)|;.......|
|00002920| 09 73 74 72 63 61 74 28 | 4b 65 79 2c 20 6b 43 6f |.strcat(|Key, kCo|
|00002930| 6e 74 65 6e 74 54 79 70 | 65 29 3b 0d 09 09 09 09 |ntentTyp|e);.....|
|00002940| 09 09 09 57 72 69 74 65 | 54 6f 4f 6c 65 52 65 67 |...Write|ToOleReg|
|00002950| 28 4b 65 79 2c 20 28 63 | 68 61 72 2a 29 6d 69 6d |(Key, (c|har*)mim|
|00002960| 65 53 74 72 69 6e 67 29 | 3b 0d 09 09 09 09 09 09 |eString)|;.......|
|00002970| 7d 0d 09 09 09 09 09 7d | 0d 09 09 09 09 09 65 6c |}......}|......el|
|00002980| 73 65 0d 09 09 09 09 09 | 7b 0d 09 09 09 09 09 09 |se......|{.......|
|00002990| 62 72 65 61 6b 3b 0d 09 | 09 09 09 09 7d 0d 09 09 |break;..|....}...|
|000029a0| 09 09 09 69 2b 2b 3b 0d | 09 09 09 09 7d 0d 09 09 |...i++;.|....}...|
|000029b0| 09 7d 0d 09 09 09 2f 2f | 20 72 65 67 69 73 74 65 |.}....//| registe|
|000029c0| 72 20 74 68 65 20 70 72 | 6f 67 69 64 2f 63 6c 73 |r the pr|ogid/cls|
|000029d0| 69 64 20 61 73 73 6f 63 | 69 61 74 69 6f 6e 0d 09 |id assoc|iation..|
|000029e0| 09 09 73 74 72 63 61 74 | 28 50 72 6f 67 49 44 2c |..strcat|(ProgID,|
|000029f0| 20 22 5c 5c 22 29 3b 0d | 09 09 09 73 74 72 63 61 | "\\");.|...strca|
|00002a00| 74 28 50 72 6f 67 49 44 | 2c 20 6b 43 4c 53 49 44 |t(ProgID|, kCLSID|
|00002a10| 43 6f 6e 73 74 29 3b 0d | 09 09 09 57 72 69 74 65 |Const);.|...Write|
|00002a20| 54 6f 4f 6c 65 52 65 67 | 28 50 72 6f 67 49 44 2c |ToOleReg|(ProgID,|
|00002a30| 20 43 6c 61 73 73 49 44 | 29 3b 0d 0d 09 09 7d 0d | ClassID|);....}.|
|00002a40| 09 7d 0d 0d 09 3a 3a 55 | 73 65 52 65 73 46 69 6c |.}...::U|seResFil|
|00002a50| 65 28 49 6e 52 65 73 46 | 69 6c 65 29 3b 0d 09 3a |e(InResF|ile);..:|
|00002a60| 3a 43 6c 6f 73 65 52 65 | 73 46 69 6c 65 28 52 65 |:CloseRe|sFile(Re|
|00002a70| 73 52 65 66 4e 75 6d 29 | 3b 0d 0d 20 20 20 20 72 |sRefNum)|;.. r|
|00002a80| 65 74 75 72 6e 20 53 5f | 4f 4b 3b 0d 7d 0d 0d 2f |eturn S_|OK;.}../|
|00002a90| 2f 0d 2f 2f 20 20 44 6c | 6c 55 6e 72 65 67 69 73 |/.// Dl|lUnregis|
|00002aa0| 74 65 72 53 65 72 76 65 | 72 0d 2f 2f 0d 2f 2f 20 |terServe|r.//.// |
|00002ab0| 20 55 6e 72 65 67 69 73 | 74 65 72 73 20 74 68 65 | Unregis|ters the|
|00002ac0| 20 73 65 72 76 65 72 20 | 66 72 6f 6d 20 74 68 65 | server |from the|
|00002ad0| 20 43 4f 4d 20 72 65 67 | 69 73 74 72 79 0d 2f 2f | COM reg|istry.//|
|00002ae0| 0d 0d 53 54 44 41 50 49 | 0d 44 6c 6c 55 6e 72 65 |..STDAPI|.DllUnre|
|00002af0| 67 69 73 74 65 72 53 65 | 72 76 65 72 28 76 6f 69 |gisterSe|rver(voi|
|00002b00| 64 29 0d 7b 0d 09 48 4b | 45 59 09 09 68 4b 65 79 |d).{..HK|EY..hKey|
|00002b10| 3b 0d 09 63 68 61 72 09 | 09 44 61 74 61 56 61 6c |;..char.|.DataVal|
|00002b20| 75 65 5b 32 35 36 5d 3b | 0d 09 63 68 61 72 09 09 |ue[256];|..char..|
|00002b30| 53 75 62 4b 65 79 5b 32 | 35 36 5d 3b 0d 09 6c 6f |SubKey[2|56];..lo|
|00002b40| 6e 67 09 09 6c 65 6e 67 | 74 68 20 3d 20 32 35 36 |ng..leng|th = 256|
|00002b50| 3b 0d 09 48 52 45 53 55 | 4c 54 09 09 68 72 20 3d |;..HRESU|LT..hr =|
|00002b60| 20 30 3b 0d 0d 09 69 66 | 20 28 44 6c 6c 44 61 74 | 0;...if| (DllDat|
|00002b70| 61 2e 49 6e 69 74 65 64 | 29 0d 09 20 20 20 20 72 |a.Inited|).. r|
|00002b80| 65 74 75 72 6e 20 45 5f | 46 41 49 4c 3b 0d 0d 09 |eturn E_|FAIL;...|
|00002b90| 2f 2f 20 53 61 76 65 20 | 6f 66 66 20 74 68 65 20 |// Save |off the |
|00002ba0| 63 75 72 72 65 6e 74 20 | 72 65 73 6f 75 72 63 65 |current |resource|
|00002bb0| 20 72 65 66 65 72 65 6e | 63 65 0d 09 73 68 6f 72 | referen|ce..shor|
|00002bc0| 74 09 49 6e 52 65 73 46 | 69 6c 65 20 3d 20 3a 3a |t.InResF|ile = ::|
|00002bd0| 43 75 72 52 65 73 46 69 | 6c 65 28 29 3b 0d 09 73 |CurResFi|le();..s|
|00002be0| 68 6f 72 74 09 52 65 73 | 52 65 66 4e 75 6d 3b 0d |hort.Res|RefNum;.|
|00002bf0| 09 0d 09 2f 2f 20 6f 70 | 65 6e 20 75 70 20 74 68 |...// op|en up th|
|00002c00| 65 20 72 65 73 6f 75 72 | 63 65 20 66 6f 72 6b 20 |e resour|ce fork |
|00002c10| 6f 66 20 74 68 65 20 64 | 6c 6c 20 61 6e 64 20 73 |of the d|ll and s|
|00002c20| 61 76 65 20 69 74 20 6f | 66 66 0d 09 52 65 73 52 |ave it o|ff..ResR|
|00002c30| 65 66 4e 75 6d 20 3d 20 | 3a 3a 46 53 70 4f 70 65 |efNum = |::FSpOpe|
|00002c40| 6e 52 65 73 46 69 6c 65 | 28 44 6c 6c 44 61 74 61 |nResFile|(DllData|
|00002c50| 2e 49 6e 69 74 42 6c 6f | 63 6b 2e 66 72 61 67 4c |.InitBlo|ck.fragL|
|00002c60| 6f 63 61 74 6f 72 2e 75 | 2e 6f 6e 44 69 73 6b 2e |ocator.u|.onDisk.|
|00002c70| 66 69 6c 65 53 70 65 63 | 2c 20 66 73 52 64 50 65 |fileSpec|, fsRdPe|
|00002c80| 72 6d 29 3b 0d 09 69 66 | 20 28 20 52 65 73 52 65 |rm);..if| ( ResRe|
|00002c90| 66 4e 75 6d 20 3c 20 30 | 20 29 0d 09 09 72 65 74 |fNum < 0| )...ret|
|00002ca0| 75 72 6e 20 45 5f 46 41 | 49 4c 3b 0d 0d 09 2f 2f |urn E_FA|IL;...//|
|00002cb0| 20 47 65 74 20 74 68 65 | 20 72 65 67 69 73 74 72 | Get the| registr|
|00002cc0| 79 20 6e 61 6d 65 73 20 | 77 65 20 77 69 6c 6c 20 |y names |we will |
|00002cd0| 6e 65 65 64 0d 09 63 68 | 61 72 09 43 6c 61 73 73 |need..ch|ar.Class|
|00002ce0| 49 44 5b 32 35 36 5d 3b | 0d 09 63 68 61 72 09 50 |ID[256];|..char.P|
|00002cf0| 72 6f 67 49 44 5b 32 35 | 36 5d 3b 0d 09 49 6e 74 |rogID[25|6];..Int|
|00002d00| 31 36 09 4d 69 6d 65 52 | 65 73 49 44 3b 0d 09 68 |16.MimeR|esID;..h|
|00002d10| 72 20 3d 20 47 65 74 52 | 65 67 69 73 74 72 79 4e |r = GetR|egistryN|
|00002d20| 61 6d 65 73 28 52 65 73 | 52 65 66 4e 75 6d 2c 20 |ames(Res|RefNum, |
|00002d30| 43 6c 61 73 73 49 44 2c | 20 50 72 6f 67 49 44 2c |ClassID,| ProgID,|
|00002d40| 20 6e 69 6c 2c 20 6e 69 | 6c 2c 20 26 4d 69 6d 65 | nil, ni|l, &Mime|
|00002d50| 52 65 73 49 44 29 3b 0d | 09 69 66 20 28 20 68 72 |ResID);.|.if ( hr|
|00002d60| 20 21 3d 20 53 5f 4f 4b | 20 29 0d 09 7b 0d 09 09 | != S_OK| )..{...|
|00002d70| 3a 3a 55 73 65 52 65 73 | 46 69 6c 65 28 49 6e 52 |::UseRes|File(InR|
|00002d80| 65 73 46 69 6c 65 29 3b | 0d 09 09 3a 3a 43 6c 6f |esFile);|...::Clo|
|00002d90| 73 65 52 65 73 46 69 6c | 65 28 52 65 73 52 65 66 |seResFil|e(ResRef|
|00002da0| 4e 75 6d 29 3b 0d 09 09 | 72 65 74 75 72 6e 20 68 |Num);...|return h|
|00002db0| 72 3b 0d 09 7d 0d 09 09 | 0d 09 2f 2f 20 75 6e 72 |r;..}...|..// unr|
|00002dc0| 65 67 69 73 74 65 72 20 | 74 68 65 20 63 6f 6e 74 |egister |the cont|
|00002dd0| 72 6f 6c 0d 09 69 66 20 | 28 52 65 67 4f 70 65 6e |rol..if |(RegOpen|
|00002de0| 4b 65 79 28 48 4b 45 59 | 5f 43 4c 41 53 53 45 53 |Key(HKEY|_CLASSES|
|00002df0| 5f 52 4f 4f 54 2c 20 22 | 43 4c 53 49 44 22 2c 20 |_ROOT, "|CLSID", |
|00002e00| 26 68 4b 65 79 29 20 3d | 3d 20 53 5f 4f 4b 29 0d |&hKey) =|= S_OK).|
|00002e10| 09 7b 0d 09 09 53 75 62 | 4b 65 79 5b 30 5d 20 3d |.{...Sub|Key[0] =|
|00002e20| 20 27 5c 30 27 3b 0d 09 | 09 73 74 72 63 70 79 28 | '\0';..|.strcpy(|
|00002e30| 53 75 62 4b 65 79 2c 20 | 6b 43 4c 53 49 44 43 6f |SubKey, |kCLSIDCo|
|00002e40| 6e 73 74 29 3b 0d 09 09 | 73 74 72 63 61 74 28 53 |nst);...|strcat(S|
|00002e50| 75 62 4b 65 79 2c 20 43 | 6c 61 73 73 49 44 29 3b |ubKey, C|lassID);|
|00002e60| 0d 09 09 69 66 20 28 52 | 65 67 51 75 65 72 79 56 |...if (R|egQueryV|
|00002e70| 61 6c 75 65 28 48 4b 45 | 59 5f 43 4c 41 53 53 45 |alue(HKE|Y_CLASSE|
|00002e80| 53 5f 52 4f 4f 54 2c 20 | 53 75 62 4b 65 79 2c 20 |S_ROOT, |SubKey, |
|00002e90| 44 61 74 61 56 61 6c 75 | 65 2c 20 26 6c 65 6e 67 |DataValu|e, &leng|
|00002ea0| 74 68 29 20 3d 3d 20 45 | 52 52 4f 52 5f 53 55 43 |th) == E|RROR_SUC|
|00002eb0| 43 45 53 53 29 0d 09 09 | 7b 0d 09 09 09 52 65 67 |CESS)...|{....Reg|
|00002ec0| 44 65 6c 65 74 65 4b 65 | 79 28 48 4b 45 59 5f 43 |DeleteKe|y(HKEY_C|
|00002ed0| 4c 41 53 53 45 53 5f 52 | 4f 4f 54 2c 20 53 75 62 |LASSES_R|OOT, Sub|
|00002ee0| 4b 65 79 29 3b 0d 09 09 | 7d 0d 0d 09 09 52 65 67 |Key);...|}....Reg|
|00002ef0| 43 6c 6f 73 65 4b 65 79 | 28 68 4b 65 79 29 3b 0d |CloseKey|(hKey);.|
|00002f00| 09 7d 0d 0d 09 2f 2f 20 | 69 66 20 74 68 65 20 63 |.}...// |if the c|
|00002f10| 6f 6e 74 72 6f 6c 20 73 | 70 65 63 69 66 69 65 73 |ontrol s|pecifies|
|00002f20| 20 61 20 50 52 4f 47 49 | 44 2c 20 72 65 67 69 73 | a PROGI|D, regis|
|00002f30| 74 65 72 20 69 74 0d 09 | 69 66 20 28 20 73 74 72 |ter it..|if ( str|
|00002f40| 6c 65 6e 28 50 72 6f 67 | 49 44 29 20 3e 20 30 20 |len(Prog|ID) > 0 |
|00002f50| 29 0d 09 7b 0d 09 09 2f | 2f 20 72 65 67 69 73 74 |)..{.../|/ regist|
|00002f60| 65 72 20 74 68 65 20 70 | 72 6f 67 69 64 0d 09 09 |er the p|rogid...|
|00002f70| 52 65 67 44 65 6c 65 74 | 65 4b 65 79 28 48 4b 45 |RegDelet|eKey(HKE|
|00002f80| 59 5f 43 4c 41 53 53 45 | 53 5f 52 4f 4f 54 2c 20 |Y_CLASSE|S_ROOT, |
|00002f90| 50 72 6f 67 49 44 29 3b | 0d 09 0d 09 09 69 66 28 |ProgID);|.....if(|
|00002fa0| 4d 69 6d 65 52 65 73 49 | 44 29 0d 09 09 7b 0d 09 |MimeResI|D)...{..|
|00002fb0| 09 09 2f 2f 20 75 6e 72 | 65 67 69 73 74 65 72 20 |..// unr|egister |
|00002fc0| 74 68 65 20 6d 69 6d 65 | 20 74 79 70 65 73 0d 09 |the mime| types..|
|00002fd0| 09 09 2f 2f 20 67 65 74 | 20 74 68 65 20 6d 69 6d |..// get| the mim|
|00002fe0| 65 20 74 79 70 65 73 20 | 61 6e 64 20 66 69 6c 65 |e types |and file|
|00002ff0| 20 65 78 74 65 6e 74 69 | 6f 6e 73 20 66 6f 72 20 | extenti|ons for |
|00003000| 61 20 63 6f 6e 74 72 6f | 6c 0d 09 09 09 69 6e 74 |a contro|l....int|
|00003010| 09 09 69 20 3d 20 31 3b | 0d 0d 09 09 09 77 68 69 |..i = 1;|.....whi|
|00003020| 6c 65 28 54 52 55 45 29 | 0d 09 09 09 7b 0d 09 09 |le(TRUE)|....{...|
|00003030| 09 09 53 74 72 32 35 35 | 09 74 68 65 53 74 72 69 |..Str255|.theStri|
|00003040| 6e 67 3b 0d 09 09 09 09 | 0d 09 09 09 09 47 65 74 |ng;.....|.....Get|
|00003050| 31 49 6e 64 53 74 72 69 | 6e 67 28 74 68 65 53 74 |1IndStri|ng(theSt|
|00003060| 72 69 6e 67 2c 20 31 32 | 38 2c 20 69 29 3b 0d 09 |ring, 12|8, i);..|
|00003070| 09 09 09 69 66 28 74 68 | 65 53 74 72 69 6e 67 5b |...if(th|eString[|
|00003080| 30 5d 20 3e 20 30 29 0d | 09 09 09 09 7b 0d 09 09 |0] > 0).|....{...|
|00003090| 09 09 09 70 32 63 73 74 | 72 28 74 68 65 53 74 72 |...p2cst|r(theStr|
|000030a0| 69 6e 67 29 3b 0d 09 09 | 09 09 09 69 66 28 69 20 |ing);...|...if(i |
|000030b0| 26 20 31 29 09 09 2f 2f | 20 6f 64 64 20 6e 75 6d |& 1)..//| odd num|
|000030c0| 62 65 72 20 73 74 72 69 | 6e 67 73 20 68 61 76 65 |ber stri|ngs have|
|000030d0| 20 6d 69 6d 65 20 74 79 | 70 65 73 0d 09 09 09 09 | mime ty|pes.....|
|000030e0| 09 7b 0d 09 09 09 09 09 | 09 69 66 20 28 52 65 67 |.{......|.if (Reg|
|000030f0| 4f 70 65 6e 4b 65 79 28 | 48 4b 45 59 5f 43 4c 41 |OpenKey(|HKEY_CLA|
|00003100| 53 53 45 53 5f 52 4f 4f | 54 2c 20 6b 52 65 67 69 |SSES_ROO|T, kRegi|
|00003110| 73 74 65 72 4d 69 6d 65 | 2c 20 26 68 4b 65 79 29 |sterMime|, &hKey)|
|00003120| 20 3d 3d 20 45 52 52 4f | 52 5f 53 55 43 43 45 53 | == ERRO|R_SUCCES|
|00003130| 53 29 0d 09 09 09 09 09 | 09 7b 0d 09 09 09 09 09 |S)......|.{......|
|00003140| 09 09 53 75 62 4b 65 79 | 5b 30 5d 20 3d 20 27 5c |..SubKey|[0] = '\|
|00003150| 30 27 3b 0d 09 09 09 09 | 09 09 09 6c 65 6e 67 74 |0';.....|...lengt|
|00003160| 68 20 3d 20 32 35 36 3b | 0d 09 09 09 09 09 09 09 |h = 256;|........|
|00003170| 73 74 72 63 61 74 28 53 | 75 62 4b 65 79 2c 20 6b |strcat(S|ubKey, k|
|00003180| 52 65 67 69 73 74 65 72 | 4d 69 6d 65 29 3b 0d 09 |Register|Mime);..|
|00003190| 09 09 09 09 09 09 73 74 | 72 63 61 74 28 53 75 62 |......st|rcat(Sub|
|000031a0| 4b 65 79 2c 20 28 63 68 | 61 72 2a 29 74 68 65 53 |Key, (ch|ar*)theS|
|000031b0| 74 72 69 6e 67 29 3b 0d | 09 09 09 09 09 09 09 73 |tring);.|.......s|
|000031c0| 74 72 63 61 74 28 53 75 | 62 4b 65 79 2c 20 22 5c |trcat(Su|bKey, "\|
|000031d0| 5c 43 4c 53 49 44 22 29 | 3b 0d 09 09 09 09 09 09 |\CLSID")|;.......|
|000031e0| 09 69 66 20 28 28 28 68 | 72 20 3d 20 52 65 67 51 |.if (((h|r = RegQ|
|000031f0| 75 65 72 79 56 61 6c 75 | 65 28 48 4b 45 59 5f 43 |ueryValu|e(HKEY_C|
|00003200| 4c 41 53 53 45 53 5f 52 | 4f 4f 54 2c 20 53 75 62 |LASSES_R|OOT, Sub|
|00003210| 4b 65 79 2c 20 44 61 74 | 61 56 61 6c 75 65 2c 20 |Key, Dat|aValue, |
|00003220| 26 6c 65 6e 67 74 68 29 | 29 20 3d 3d 20 45 52 52 |&length)|) == ERR|
|00003230| 4f 52 5f 53 55 43 43 45 | 53 53 29 20 26 26 0d 09 |OR_SUCCE|SS) &&..|
|00003240| 09 09 09 09 09 09 09 28 | 28 6c 65 6e 67 74 68 20 |.......(|(length |
|00003250| 3d 20 73 74 72 6c 65 6e | 28 44 61 74 61 56 61 6c |= strlen|(DataVal|
|00003260| 75 65 29 29 20 3d 3d 20 | 73 74 72 6c 65 6e 28 43 |ue)) == |strlen(C|
|00003270| 6c 61 73 73 49 44 29 29 | 20 26 26 20 28 73 74 72 |lassID))| && (str|
|00003280| 6e 63 6d 70 28 44 61 74 | 61 56 61 6c 75 65 2c 20 |ncmp(Dat|aValue, |
|00003290| 43 6c 61 73 73 49 44 2c | 20 6c 65 6e 67 74 68 29 |ClassID,| length)|
|000032a0| 20 3d 3d 20 30 29 29 0d | 09 09 09 09 09 09 09 7b | == 0)).|.......{|
|000032b0| 0d 09 09 09 09 09 09 09 | 09 53 75 62 4b 65 79 5b |........|.SubKey[|
|000032c0| 30 5d 20 3d 20 27 5c 30 | 27 3b 0d 09 09 09 09 09 |0] = '\0|';......|
|000032d0| 09 09 09 73 74 72 63 61 | 74 28 53 75 62 4b 65 79 |...strca|t(SubKey|
|000032e0| 2c 20 6b 52 65 67 69 73 | 74 65 72 4d 69 6d 65 29 |, kRegis|terMime)|
|000032f0| 3b 0d 09 09 09 09 09 09 | 09 09 73 74 72 63 61 74 |;.......|..strcat|
|00003300| 28 53 75 62 4b 65 79 2c | 20 28 63 68 61 72 2a 29 |(SubKey,| (char*)|
|00003310| 74 68 65 53 74 72 69 6e | 67 29 3b 0d 09 09 09 09 |theStrin|g);.....|
|00003320| 09 09 09 09 52 65 67 44 | 65 6c 65 74 65 4b 65 79 |....RegD|eleteKey|
|00003330| 28 48 4b 45 59 5f 43 4c | 41 53 53 45 53 5f 52 4f |(HKEY_CL|ASSES_RO|
|00003340| 4f 54 2c 20 53 75 62 4b | 65 79 29 3b 0d 09 09 09 |OT, SubK|ey);....|
|00003350| 09 09 09 09 7d 0d 0d 09 | 09 09 09 09 09 09 52 65 |....}...|......Re|
|00003360| 67 43 6c 6f 73 65 4b 65 | 79 28 68 4b 65 79 29 3b |gCloseKe|y(hKey);|
|00003370| 0d 09 09 09 09 09 09 7d | 0d 09 09 09 09 09 7d 0d |.......}|......}.|
|00003380| 09 09 09 09 09 65 6c 73 | 65 09 09 2f 2f 20 65 78 |.....els|e..// ex|
|00003390| 74 65 6e 73 69 6f 6e 0d | 09 09 09 09 09 7b 0d 09 |tension.|.....{..|
|000033a0| 09 09 09 09 09 52 65 67 | 44 65 6c 65 74 65 4b 65 |.....Reg|DeleteKe|
|000033b0| 79 28 48 4b 45 59 5f 43 | 4c 41 53 53 45 53 5f 52 |y(HKEY_C|LASSES_R|
|000033c0| 4f 4f 54 2c 20 28 63 68 | 61 72 2a 29 74 68 65 53 |OOT, (ch|ar*)theS|
|000033d0| 74 72 69 6e 67 29 3b 0d | 0d 09 09 09 09 09 09 53 |tring);.|.......S|
|000033e0| 75 62 4b 65 79 5b 30 5d | 20 3d 20 27 5c 30 27 3b |ubKey[0]| = '\0';|
|000033f0| 0d 09 09 09 09 09 09 73 | 74 72 63 61 74 28 53 75 |.......s|trcat(Su|
|00003400| 62 4b 65 79 2c 20 6b 52 | 65 67 69 73 74 65 72 45 |bKey, kR|egisterE|
|00003410| 78 74 29 3b 0d 09 09 09 | 09 09 09 73 74 72 63 61 |xt);....|...strca|
|00003420| 74 28 53 75 62 4b 65 79 | 2c 20 28 63 68 61 72 2a |t(SubKey|, (char*|
|00003430| 29 74 68 65 53 74 72 69 | 6e 67 29 3b 0d 09 09 09 |)theStri|ng);....|
|00003440| 09 09 09 52 65 67 44 65 | 6c 65 74 65 4b 65 79 28 |...RegDe|leteKey(|
|00003450| 48 4b 45 59 5f 43 4c 41 | 53 53 45 53 5f 52 4f 4f |HKEY_CLA|SSES_ROO|
|00003460| 54 2c 20 53 75 62 4b 65 | 79 29 3b 0d 0d 09 09 09 |T, SubKe|y);.....|
|00003470| 09 09 7d 0d 09 09 09 09 | 7d 0d 09 09 09 09 65 6c |..}.....|}.....el|
|00003480| 73 65 0d 09 09 09 09 7b | 0d 09 09 09 09 09 62 72 |se.....{|......br|
|00003490| 65 61 6b 3b 0d 09 09 09 | 09 7d 0d 09 09 09 09 69 |eak;....|.}.....i|
|000034a0| 2b 2b 3b 0d 09 09 09 7d | 0d 09 09 7d 0d 09 7d 0d |++;....}|...}..}.|
|000034b0| 09 0d 09 3a 3a 55 73 65 | 52 65 73 46 69 6c 65 28 |...::Use|ResFile(|
|000034c0| 49 6e 52 65 73 46 69 6c | 65 29 3b 0d 09 3a 3a 43 |InResFil|e);..::C|
|000034d0| 6c 6f 73 65 52 65 73 46 | 69 6c 65 28 52 65 73 52 |loseResF|ile(ResR|
|000034e0| 65 66 4e 75 6d 29 3b 0d | 0d 20 20 20 20 72 65 74 |efNum);.|. ret|
|000034f0| 75 72 6e 20 53 5f 4f 4b | 3b 0d 7d 0d 0d 2f 2f 0d |urn S_OK|;.}..//.|
|00003500| 2f 2f 20 20 44 6c 6c 47 | 65 74 56 65 72 73 69 6f |// DllG|etVersio|
|00003510| 6e 0d 2f 2f 0d 2f 2f 20 | 20 67 65 74 73 20 74 68 |n.//.// | gets th|
|00003520| 65 20 63 6f 6e 74 72 6f | 6c 73 20 76 65 72 73 69 |e contro|ls versi|
|00003530| 6f 6e 0d 2f 2f 0d 0d 53 | 54 44 41 50 49 0d 44 6c |on.//..S|TDAPI.Dl|
|00003540| 6c 47 65 74 56 65 72 73 | 69 6f 6e 28 55 49 6e 74 |lGetVers|ion(UInt|
|00003550| 33 32 2a 20 70 56 65 72 | 73 69 6f 6e 29 0d 7b 0d |32* pVer|sion).{.|
|00003560| 09 48 61 6e 64 6c 65 09 | 68 52 65 73 6f 75 72 63 |.Handle.|hResourc|
|00003570| 65 20 3d 20 4e 55 4c 4c | 3b 0d 09 48 52 45 53 55 |e = NULL|;..HRESU|
|00003580| 4c 54 09 45 72 72 6f 72 | 20 3d 20 45 5f 46 41 49 |LT.Error| = E_FAI|
|00003590| 4c 3b 0d 09 0d 09 69 66 | 20 28 21 44 6c 6c 44 61 |L;....if| (!DllDa|
|000035a0| 74 61 2e 49 6e 69 74 65 | 64 20 26 26 20 44 6c 6c |ta.Inite|d && Dll|
|000035b0| 44 61 74 61 2e 49 6e 69 | 74 42 6c 6f 63 6b 2e 66 |Data.Ini|tBlock.f|
|000035c0| 72 61 67 4c 6f 63 61 74 | 6f 72 2e 77 68 65 72 65 |ragLocat|or.where|
|000035d0| 20 3d 3d 20 6b 44 61 74 | 61 46 6f 72 6b 43 46 72 | == kDat|aForkCFr|
|000035e0| 61 67 4c 6f 63 61 74 6f | 72 29 0d 09 7b 0d 09 09 |agLocato|r)..{...|
|000035f0| 73 68 6f 72 74 09 49 6e | 52 65 73 46 69 6c 65 20 |short.In|ResFile |
|00003600| 3d 20 3a 3a 43 75 72 52 | 65 73 46 69 6c 65 28 29 |= ::CurR|esFile()|
|00003610| 3b 0d 09 09 73 68 6f 72 | 74 09 52 65 73 52 65 66 |;...shor|t.ResRef|
|00003620| 4e 75 6d 3b 0d 0d 09 09 | 2f 2f 09 6f 70 65 6e 20 |Num;....|//.open |
|00003630| 75 70 20 74 68 65 20 72 | 65 73 6f 75 72 63 65 20 |up the r|esource |
|00003640| 66 6f 72 6b 20 6f 66 20 | 74 68 65 20 64 6c 6c 20 |fork of |the dll |
|00003650| 61 6e 64 20 73 61 76 65 | 20 69 74 20 6f 66 66 0d |and save| it off.|
|00003660| 09 09 52 65 73 52 65 66 | 4e 75 6d 20 3d 20 3a 3a |..ResRef|Num = ::|
|00003670| 46 53 70 4f 70 65 6e 52 | 65 73 46 69 6c 65 28 44 |FSpOpenR|esFile(D|
|00003680| 6c 6c 44 61 74 61 2e 49 | 6e 69 74 42 6c 6f 63 6b |llData.I|nitBlock|
|00003690| 2e 66 72 61 67 4c 6f 63 | 61 74 6f 72 2e 75 2e 6f |.fragLoc|ator.u.o|
|000036a0| 6e 44 69 73 6b 2e 66 69 | 6c 65 53 70 65 63 2c 20 |nDisk.fi|leSpec, |
|000036b0| 66 73 52 64 50 65 72 6d | 29 3b 0d 0d 09 09 68 52 |fsRdPerm|);....hR|
|000036c0| 65 73 6f 75 72 63 65 20 | 3d 20 47 65 74 31 52 65 |esource |= Get1Re|
|000036d0| 73 6f 75 72 63 65 28 27 | 76 65 72 73 27 2c 20 31 |source('|vers', 1|
|000036e0| 29 3b 0d 09 09 0d 09 09 | 69 66 20 28 68 52 65 73 |);......|if (hRes|
|000036f0| 6f 75 72 63 65 20 26 26 | 20 47 65 74 48 61 6e 64 |ource &&| GetHand|
|00003700| 6c 65 53 69 7a 65 28 68 | 52 65 73 6f 75 72 63 65 |leSize(h|Resource|
|00003710| 29 20 3e 20 73 69 7a 65 | 6f 66 28 55 49 6e 74 33 |) > size|of(UInt3|
|00003720| 32 29 29 0d 09 09 7b 0d | 09 09 09 2f 2f 20 20 45 |2))...{.|...// E|
|00003730| 78 74 72 61 63 74 20 74 | 68 65 20 76 65 72 73 69 |xtract t|he versi|
|00003740| 6f 6e 20 6e 75 6d 62 65 | 72 20 66 72 6f 6d 20 74 |on numbe|r from t|
|00003750| 68 65 20 72 65 73 6f 75 | 72 63 65 2c 20 73 74 72 |he resou|rce, str|
|00003760| 69 70 70 69 6e 67 20 6f | 66 66 0d 09 09 09 2f 2f |ipping o|ff....//|
|00003770| 20 20 74 68 65 20 72 65 | 6c 65 61 73 65 20 73 74 | the re|lease st|
|00003780| 61 67 65 20 62 79 74 65 | 2e 0d 09 09 09 44 4c 4c |age byte|.....DLL|
|00003790| 56 65 72 73 69 6f 6e 20 | 3d 20 2a 70 56 65 72 73 |Version |= *pVers|
|000037a0| 69 6f 6e 20 3d 20 28 2a | 28 28 4c 50 44 57 4f 52 |ion = (*|((LPDWOR|
|000037b0| 44 29 28 2a 68 52 65 73 | 6f 75 72 63 65 29 29 29 |D)(*hRes|ource)))|
|000037c0| 20 26 20 30 78 46 46 46 | 46 30 30 46 46 3b 0d 09 | & 0xFFF|F00FF;..|
|000037d0| 09 09 45 72 72 6f 72 20 | 3d 20 53 5f 4f 4b 3b 0d |..Error |= S_OK;.|
|000037e0| 09 09 7d 0d 09 09 69 66 | 28 68 52 65 73 6f 75 72 |..}...if|(hResour|
|000037f0| 63 65 29 0d 09 09 09 52 | 65 6c 65 61 73 65 52 65 |ce)....R|eleaseRe|
|00003800| 73 6f 75 72 63 65 28 68 | 52 65 73 6f 75 72 63 65 |source(h|Resource|
|00003810| 29 3b 0d 09 09 0d 09 09 | 3a 3a 55 73 65 52 65 73 |);......|::UseRes|
|00003820| 46 69 6c 65 28 49 6e 52 | 65 73 46 69 6c 65 29 3b |File(InR|esFile);|
|00003830| 0d 09 09 43 6c 6f 73 65 | 52 65 73 46 69 6c 65 28 |...Close|ResFile(|
|00003840| 52 65 73 52 65 66 4e 75 | 6d 29 3b 0d 09 7d 0d 09 |ResRefNu|m);..}..|
|00003850| 65 6c 73 65 0d 09 09 2a | 70 56 65 72 73 69 6f 6e |else...*|pVersion|
|00003860| 20 3d 20 44 4c 4c 56 65 | 72 73 69 6f 6e 3b 0d 0d | = DLLVe|rsion;..|
|00003870| 09 72 65 74 75 72 6e 20 | 45 72 72 6f 72 3b 0d 7d |.return |Error;.}|
|00003880| 0d 0d 2f 2f 0d 2f 2f 20 | 20 44 6c 6c 49 6e 69 74 |..//.// | DllInit|
|00003890| 69 61 6c 69 7a 61 74 69 | 6f 6e 52 6f 75 74 69 6e |ializati|onRoutin|
|000038a0| 65 0d 2f 2f 0d 2f 2f 20 | 20 49 6e 69 74 69 61 6c |e.//.// | Initial|
|000038b0| 69 7a 61 74 69 6f 6e 20 | 72 6f 75 74 69 6e 65 20 |ization |routine |
|000038c0| 63 61 6c 6c 65 64 20 62 | 79 20 43 4f 4d 0d 2f 2f |called b|y COM.//|
|000038d0| 0d 0d 4f 53 45 72 72 20 | 70 61 73 63 61 6c 0d 44 |..OSErr |pascal.D|
|000038e0| 6c 6c 49 6e 69 74 69 61 | 6c 69 7a 61 74 69 6f 6e |llInitia|lization|
|000038f0| 52 6f 75 74 69 6e 65 28 | 43 46 72 61 67 49 6e 69 |Routine(|CFragIni|
|00003900| 74 42 6c 6f 63 6b 50 74 | 72 20 69 6e 69 74 42 6c |tBlockPt|r initBl|
|00003910| 6b 50 74 72 29 0d 7b 0d | 09 44 6c 6c 44 61 74 61 |kPtr).{.|.DllData|
|00003920| 2e 49 6e 69 74 42 6c 6f | 63 6b 20 3d 20 2a 69 6e |.InitBlo|ck = *in|
|00003930| 69 74 42 6c 6b 50 74 72 | 3b 0d 09 44 6c 6c 44 61 |itBlkPtr|;..DllDa|
|00003940| 74 61 2e 54 6f 70 4d 61 | 70 48 64 6c 20 3d 20 4e |ta.TopMa|pHdl = N|
|00003950| 55 4c 4c 3b 0d 09 44 6c | 6c 44 61 74 61 2e 49 6e |ULL;..Dl|lData.In|
|00003960| 69 74 65 64 20 3d 20 66 | 61 6c 73 65 3b 0d 09 44 |ited = f|alse;..D|
|00003970| 6c 6c 44 61 74 61 2e 52 | 65 73 52 65 66 4e 75 6d |llData.R|esRefNum|
|00003980| 20 3d 20 2d 31 3b 0d 09 | 44 6c 6c 44 61 74 61 2e | = -1;..|DllData.|
|00003990| 52 65 66 54 68 69 73 44 | 6c 6c 20 3d 20 30 3b 0d |RefThisD|ll = 0;.|
|000039a0| 0d 09 5f 5f 69 6e 69 74 | 69 61 6c 69 7a 65 28 69 |..__init|ialize(i|
|000039b0| 6e 69 74 42 6c 6b 50 74 | 72 29 3b 0d 20 20 20 20 |nitBlkPt|r);. |
|000039c0| 72 65 74 75 72 6e 20 6e | 6f 45 72 72 3b 0d 7d 0d |return n|oErr;.}.|
|000039d0| 0d 0d 2f 2f 0d 2f 2f 20 | 20 44 6c 6c 49 6e 69 74 |..//.// | DllInit|
|000039e0| 69 61 6c 69 7a 61 74 69 | 6f 6e 52 6f 75 74 69 6e |ializati|onRoutin|
|000039f0| 65 0d 2f 2f 0d 2f 2f 20 | 20 49 6e 69 74 69 61 6c |e.//.// | Initial|
|00003a00| 69 7a 61 74 69 6f 6e 20 | 72 6f 75 74 69 6e 65 20 |ization |routine |
|00003a10| 63 61 6c 6c 65 64 20 62 | 79 20 43 4f 4d 0d 2f 2f |called b|y COM.//|
|00003a20| 0d 0d 4f 53 45 72 72 20 | 70 61 73 63 61 6c 0d 44 |..OSErr |pascal.D|
|00003a30| 6c 6c 45 78 65 63 75 74 | 69 6f 6e 52 6f 75 74 69 |llExecut|ionRouti|
|00003a40| 6e 65 28 29 0d 7b 0d 09 | 2f 2f 09 74 68 69 73 20 |ne().{..|//.this |
|00003a50| 72 6f 75 74 69 6e 65 20 | 69 73 6e 27 74 20 67 65 |routine |isn't ge|
|00003a60| 74 74 69 6e 67 20 63 61 | 6c 6c 65 64 20 62 79 20 |tting ca|lled by |
|00003a70| 61 6e 79 62 6f 64 79 0d | 20 20 20 20 72 65 74 75 |anybody.| retu|
|00003a80| 72 6e 20 6e 6f 45 72 72 | 3b 0d 7d 0d 0d 0d 2f 2f |rn noErr|;.}...//|
|00003a90| 0d 2f 2f 20 20 44 6c 6c | 54 65 72 6d 69 6e 61 74 |.// Dll|Terminat|
|00003aa0| 69 6f 6e 52 6f 75 74 69 | 6e 65 0d 2f 2f 0d 2f 2f |ionRouti|ne.//.//|
|00003ab0| 20 20 54 65 72 6d 69 6e | 61 74 69 6f 6e 20 72 6f | Termin|ation ro|
|00003ac0| 75 74 69 6e 65 20 63 61 | 6c 6c 65 64 20 62 79 20 |utine ca|lled by |
|00003ad0| 43 4f 4d 0d 2f 2f 0d 0d | 76 6f 69 64 20 70 61 73 |COM.//..|void pas|
|00003ae0| 63 61 6c 0d 44 6c 6c 54 | 65 72 6d 69 6e 61 74 69 |cal.DllT|erminati|
|00003af0| 6f 6e 52 6f 75 74 69 6e | 65 28 29 0d 7b 0d 09 69 |onRoutin|e().{..i|
|00003b00| 66 20 28 44 6c 6c 44 61 | 74 61 2e 49 6e 69 74 65 |f (DllDa|ta.Inite|
|00003b10| 64 29 0d 09 7b 0d 09 09 | 69 66 20 28 44 6c 6c 44 |d)..{...|if (DllD|
|00003b20| 61 74 61 2e 52 65 73 52 | 65 66 4e 75 6d 20 21 3d |ata.ResR|efNum !=|
|00003b30| 20 2d 31 29 0d 09 09 7b | 0d 09 09 09 69 66 20 28 | -1)...{|....if (|
|00003b40| 44 6c 6c 44 61 74 61 2e | 54 6f 70 4d 61 70 48 64 |DllData.|TopMapHd|
|00003b50| 6c 20 21 3d 20 4e 55 4c | 4c 29 0d 09 09 09 7b 0d |l != NUL|L)....{.|
|00003b60| 09 09 09 09 48 61 6e 64 | 6c 65 09 49 6e 54 6f 70 |....Hand|le.InTop|
|00003b70| 4d 61 70 48 61 6e 64 6c | 65 20 3d 20 3a 3a 4c 4d |MapHandl|e = ::LM|
|00003b80| 47 65 74 54 6f 70 4d 61 | 70 48 6e 64 6c 28 29 3b |GetTopMa|pHndl();|
|00003b90| 0d 09 09 09 09 28 2a 52 | 65 73 6f 75 72 63 65 4d |.....(*R|esourceM|
|00003ba0| 61 70 48 61 6e 64 6c 65 | 28 44 6c 6c 44 61 74 61 |apHandle|(DllData|
|00003bb0| 2e 54 6f 70 4d 61 70 48 | 64 6c 29 29 2d 3e 4e 65 |.TopMapH|dl))->Ne|
|00003bc0| 78 74 52 65 73 6f 75 72 | 63 65 4d 61 70 20 3d 0d |xtResour|ceMap =.|
|00003bd0| 09 09 09 09 09 52 65 73 | 6f 75 72 63 65 4d 61 70 |.....Res|ourceMap|
|00003be0| 48 61 6e 64 6c 65 28 49 | 6e 54 6f 70 4d 61 70 48 |Handle(I|nTopMapH|
|00003bf0| 61 6e 64 6c 65 29 3b 0d | 09 09 09 09 3a 3a 4c 4d |andle);.|....::LM|
|00003c00| 53 65 74 54 6f 70 4d 61 | 70 48 6e 64 6c 28 20 48 |SetTopMa|pHndl( H|
|00003c10| 61 6e 64 6c 65 28 44 6c | 6c 44 61 74 61 2e 54 6f |andle(Dl|lData.To|
|00003c20| 70 4d 61 70 48 64 6c 29 | 20 29 3b 0d 09 09 09 7d |pMapHdl)| );....}|
|00003c30| 0d 09 09 09 0d 09 09 09 | 43 6c 6f 73 65 52 65 73 |........|CloseRes|
|00003c40| 46 69 6c 65 28 44 6c 6c | 44 61 74 61 2e 52 65 73 |File(Dll|Data.Res|
|00003c50| 52 65 66 4e 75 6d 29 3b | 0d 09 09 09 44 6c 6c 44 |RefNum);|....DllD|
|00003c60| 61 74 61 2e 52 65 73 52 | 65 66 4e 75 6d 20 3d 20 |ata.ResR|efNum = |
|00003c70| 2d 31 3b 0d 09 09 7d 0d | 09 7d 0d 09 5f 5f 74 65 |-1;...}.|.}..__te|
|00003c80| 72 6d 69 6e 61 74 65 28 | 29 3b 0d 7d 0d 0d 0d 0d |rminate(|);.}....|
|00003c90| 75 6e 73 69 67 6e 65 64 | 20 6c 6f 6e 67 20 44 4c |unsigned| long DL|
|00003ca0| 4c 41 64 64 52 65 66 28 | 29 0d 7b 0d 09 72 65 74 |LAddRef(|).{..ret|
|00003cb0| 75 72 6e 20 2b 2b 44 6c | 6c 44 61 74 61 2e 52 65 |urn ++Dl|lData.Re|
|00003cc0| 66 54 68 69 73 44 6c 6c | 3b 0d 7d 0d 0d 75 6e 73 |fThisDll|;.}..uns|
|00003cd0| 69 67 6e 65 64 20 6c 6f | 6e 67 20 44 4c 4c 52 65 |igned lo|ng DLLRe|
|00003ce0| 6c 65 61 73 65 28 29 0d | 7b 0d 09 72 65 74 75 72 |lease().|{..retur|
|00003cf0| 6e 20 2d 2d 44 6c 6c 44 | 61 74 61 2e 52 65 66 54 |n --DllD|ata.RefT|
|00003d00| 68 69 73 44 6c 6c 3b 0d | 7d 0d 0d 23 70 72 61 67 |hisDll;.|}..#prag|
|00003d10| 6d 61 20 65 78 70 6f 72 | 74 20 6f 66 66 0d 0d 0d |ma expor|t off...|
|00003d20| 23 70 72 61 67 6d 61 20 | 6d 61 72 6b 20 2d 2d 2d |#pragma |mark ---|
|00003d30| 2d 2d 2d 2d 2d 20 4c 6f | 63 61 6c 20 46 75 6e 63 |----- Lo|cal Func|
|00003d40| 74 69 6f 6e 73 20 2d 2d | 2d 2d 2d 2d 2d 2d 2d 2d |tions --|--------|
|00003d50| 2d 2d 2d 2d 2d 0d 0d 2f | 2f 0d 2f 2f 20 20 57 72 |-----../|/.// Wr|
|00003d60| 69 74 65 54 6f 4f 6c 65 | 52 65 67 0d 2f 2f 0d 2f |iteToOle|Reg.//./|
|00003d70| 2f 20 20 55 74 69 6c 69 | 74 79 20 66 75 6e 63 74 |/ Utili|ty funct|
|00003d80| 69 6f 6e 20 66 6f 72 20 | 77 72 69 74 69 6e 67 20 |ion for |writing |
|00003d90| 61 20 43 4c 41 53 53 49 | 44 20 6b 65 79 20 74 6f |a CLASSI|D key to|
|00003da0| 20 74 68 65 20 43 4f 4d | 20 72 65 67 69 73 74 72 | the COM| registr|
|00003db0| 79 0d 2f 2f 0d 0d 70 61 | 73 63 61 6c 20 76 6f 69 |y.//..pa|scal voi|
|00003dc0| 64 20 57 72 69 74 65 54 | 6f 4f 6c 65 52 65 67 20 |d WriteT|oOleReg |
|00003dd0| 28 63 68 61 72 20 2a 20 | 73 74 72 4b 65 79 2c 20 |(char * |strKey, |
|00003de0| 63 68 61 72 20 2a 20 73 | 74 72 56 61 6c 75 65 29 |char * s|trValue)|
|00003df0| 0d 7b 0d 09 73 74 61 74 | 69 63 20 42 6f 6f 6c 65 |.{..stat|ic Boole|
|00003e00| 61 6e 20 09 66 4e 6f 45 | 72 72 20 3d 20 74 72 75 |an .fNoE|rr = tru|
|00003e10| 65 3b 0d 09 53 43 4f 44 | 45 20 09 09 09 73 63 3b |e;..SCOD|E ...sc;|
|00003e20| 0d 0d 09 73 63 20 3d 20 | 52 65 67 53 65 74 56 61 |...sc = |RegSetVa|
|00003e30| 6c 75 65 28 48 4b 45 59 | 5f 43 4c 41 53 53 45 53 |lue(HKEY|_CLASSES|
|00003e40| 5f 52 4f 4f 54 2c 20 73 | 74 72 4b 65 79 2c 20 52 |_ROOT, s|trKey, R|
|00003e50| 45 47 5f 53 5a 2c 20 73 | 74 72 56 61 6c 75 65 2c |EG_SZ, s|trValue,|
|00003e60| 20 30 29 3b 0d 09 69 66 | 20 28 73 63 20 21 3d 20 | 0);..if| (sc != |
|00003e70| 53 5f 4f 4b 29 0d 09 7b | 0d 09 09 66 4e 6f 45 72 |S_OK)..{|...fNoEr|
|00003e80| 72 20 3d 20 66 61 6c 73 | 65 3b 0d 09 7d 0d 7d 0d |r = fals|e;..}.}.|
|00003e90| 0d 0d 76 6f 69 64 20 47 | 65 74 31 49 6e 64 53 74 |..void G|et1IndSt|
|00003ea0| 72 69 6e 67 28 53 74 72 | 32 35 35 20 74 68 65 53 |ring(Str|255 theS|
|00003eb0| 74 72 69 6e 67 2c 20 73 | 68 6f 72 74 20 73 74 72 |tring, s|hort str|
|00003ec0| 4c 69 73 74 49 44 2c 20 | 73 68 6f 72 74 20 69 6e |ListID, |short in|
|00003ed0| 64 65 78 29 0d 7b 0d 09 | 69 66 28 74 68 65 53 74 |dex).{..|if(theSt|
|00003ee0| 72 69 6e 67 29 0d 09 7b | 0d 09 09 48 61 6e 64 6c |ring)..{|...Handl|
|00003ef0| 65 09 53 74 72 69 6e 67 | 52 65 73 20 3d 20 4e 55 |e.String|Res = NU|
|00003f00| 4c 4c 3b 0d 09 09 63 68 | 61 72 2a 09 70 53 74 72 |LL;...ch|ar*.pStr|
|00003f10| 69 6e 67 52 65 73 3b 0d | 09 09 6c 6f 6e 67 09 52 |ingRes;.|..long.R|
|00003f20| 65 73 4c 65 6e 67 74 68 | 3b 0d 09 09 6c 6f 6e 67 |esLength|;...long|
|00003f30| 09 53 74 72 69 6e 67 4c | 65 6e 3b 0d 09 09 73 68 |.StringL|en;...sh|
|00003f40| 6f 72 74 09 69 3b 0d 09 | 09 73 68 6f 72 74 09 4e |ort.i;..|.short.N|
|00003f50| 75 6d 62 65 72 4f 66 53 | 74 72 69 6e 67 73 3b 0d |umberOfS|trings;.|
|00003f60| 09 09 0d 09 09 2a 28 74 | 68 65 53 74 72 69 6e 67 |.....*(t|heString|
|00003f70| 29 20 3d 20 30 3b 09 2f | 2f 20 6e 6f 74 68 69 6e |) = 0;./|/ nothin|
|00003f80| 67 20 79 65 74 0d 09 09 | 53 74 72 69 6e 67 52 65 |g yet...|StringRe|
|00003f90| 73 20 3d 20 47 65 74 31 | 52 65 73 6f 75 72 63 65 |s = Get1|Resource|
|00003fa0| 28 27 53 54 52 23 27 2c | 20 73 74 72 4c 69 73 74 |('STR#',| strList|
|00003fb0| 49 44 29 3b 0d 09 09 69 | 66 28 53 74 72 69 6e 67 |ID);...i|f(String|
|00003fc0| 52 65 73 29 0d 09 09 7b | 0d 09 09 09 48 4c 6f 63 |Res)...{|....HLoc|
|00003fd0| 6b 28 53 74 72 69 6e 67 | 52 65 73 29 3b 0d 09 09 |k(String|Res);...|
|00003fe0| 09 70 53 74 72 69 6e 67 | 52 65 73 20 3d 20 2a 53 |.pString|Res = *S|
|00003ff0| 74 72 69 6e 67 52 65 73 | 3b 0d 09 09 09 52 65 73 |tringRes|;....Res|
|00004000| 4c 65 6e 67 74 68 20 3d | 20 47 65 74 48 61 6e 64 |Length =| GetHand|
|00004010| 6c 65 53 69 7a 65 28 53 | 74 72 69 6e 67 52 65 73 |leSize(S|tringRes|
|00004020| 29 3b 0d 09 09 09 4e 75 | 6d 62 65 72 4f 66 53 74 |);....Nu|mberOfSt|
|00004030| 72 69 6e 67 73 20 3d 20 | 2a 28 73 68 6f 72 74 2a |rings = |*(short*|
|00004040| 29 70 53 74 72 69 6e 67 | 52 65 73 3b 09 2f 2f 20 |)pString|Res;.// |
|00004050| 23 20 6f 66 20 73 74 72 | 69 6e 67 73 20 69 73 20 |# of str|ings is |
|00004060| 66 69 72 73 74 0d 09 09 | 09 70 53 74 72 69 6e 67 |first...|.pString|
|00004070| 52 65 73 20 2b 3d 20 32 | 3b 0d 09 09 09 69 20 3d |Res += 2|;....i =|
|00004080| 20 31 3b 0d 09 09 09 77 | 68 69 6c 65 28 52 65 73 | 1;....w|hile(Res|
|00004090| 4c 65 6e 67 74 68 20 3e | 20 30 20 26 26 20 69 6e |Length >| 0 && in|
|000040a0| 64 65 78 20 3c 3d 20 4e | 75 6d 62 65 72 4f 66 53 |dex <= N|umberOfS|
|000040b0| 74 72 69 6e 67 73 29 0d | 09 09 09 7b 0d 09 09 09 |trings).|...{....|
|000040c0| 09 53 74 72 69 6e 67 4c | 65 6e 20 3d 20 2a 70 53 |.StringL|en = *pS|
|000040d0| 74 72 69 6e 67 52 65 73 | 3b 0d 09 09 09 09 69 66 |tringRes|;.....if|
|000040e0| 28 69 6e 64 65 78 20 3d | 3d 20 69 29 0d 09 09 09 |(index =|= i)....|
|000040f0| 09 7b 0d 09 09 09 09 09 | 73 74 72 6e 63 70 79 28 |.{......|strncpy(|
|00004100| 28 63 68 61 72 2a 29 74 | 68 65 53 74 72 69 6e 67 |(char*)t|heString|
|00004110| 2c 20 70 53 74 72 69 6e | 67 52 65 73 2c 20 53 74 |, pStrin|gRes, St|
|00004120| 72 69 6e 67 4c 65 6e 20 | 2b 20 31 29 3b 0d 09 09 |ringLen |+ 1);...|
|00004130| 09 09 09 62 72 65 61 6b | 3b 0d 09 09 09 09 7d 0d |...break|;.....}.|
|00004140| 09 09 09 09 65 6c 73 65 | 0d 09 09 09 09 7b 0d 09 |....else|.....{..|
|00004150| 09 09 09 09 70 53 74 72 | 69 6e 67 52 65 73 20 2b |....pStr|ingRes +|
|00004160| 3d 20 53 74 72 69 6e 67 | 4c 65 6e 20 2b 20 31 3b |= String|Len + 1;|
|00004170| 0d 09 09 09 09 7d 0d 09 | 09 09 09 69 2b 2b 3b 0d |.....}..|...i++;.|
|00004180| 09 09 09 7d 0d 09 09 09 | 48 55 6e 6c 6f 63 6b 28 |...}....|HUnlock(|
|00004190| 53 74 72 69 6e 67 52 65 | 73 29 3b 0d 09 09 7d 0d |StringRe|s);...}.|
|000041a0| 09 7d 0d 7d 0d 0d 2f 2f | 0d 2f 2f 20 20 47 65 74 |.}.}..//|.// Get|
|000041b0| 43 6c 61 73 73 49 44 0d | 2f 2f 0d 41 58 45 72 72 |ClassID.|//.AXErr|
|000041c0| 6f 72 43 6f 64 65 20 47 | 65 74 43 6c 61 73 73 49 |orCode G|etClassI|
|000041d0| 44 28 43 4c 53 49 44 2a | 20 6f 75 74 43 6c 61 73 |D(CLSID*| outClas|
|000041e0| 73 49 44 29 0d 7b 0d 23 | 69 66 64 65 66 20 46 45 |sID).{.#|ifdef FE|
|000041f0| 41 54 55 52 45 5f 4f 42 | 4a 45 43 54 49 4e 46 4f |ATURE_OB|JECTINFO|
|00004200| 0d 09 73 68 6f 72 74 09 | 49 6e 52 65 73 46 69 6c |..short.|InResFil|
|00004210| 65 20 3d 20 3a 3a 43 75 | 72 52 65 73 46 69 6c 65 |e = ::Cu|rResFile|
|00004220| 28 29 3b 0d 09 73 68 6f | 72 74 20 09 52 65 73 52 |();..sho|rt .ResR|
|00004230| 65 66 4e 75 6d 20 3d 20 | 3a 3a 46 53 70 4f 70 65 |efNum = |::FSpOpe|
|00004240| 6e 52 65 73 46 69 6c 65 | 28 44 6c 6c 44 61 74 61 |nResFile|(DllData|
|00004250| 2e 49 6e 69 74 42 6c 6f | 63 6b 2e 66 72 61 67 4c |.InitBlo|ck.fragL|
|00004260| 6f 63 61 74 6f 72 2e 75 | 2e 6f 6e 44 69 73 6b 2e |ocator.u|.onDisk.|
|00004270| 66 69 6c 65 53 70 65 63 | 2c 20 66 73 52 64 50 65 |fileSpec|, fsRdPe|
|00004280| 72 6d 29 3b 0d 09 69 66 | 20 28 20 52 65 73 52 65 |rm);..if| ( ResRe|
|00004290| 66 4e 75 6d 20 3c 20 30 | 20 29 0d 09 09 72 65 74 |fNum < 0| )...ret|
|000042a0| 75 72 6e 20 45 5f 46 41 | 49 4c 3b 0d 0d 09 41 58 |urn E_FA|IL;...AX|
|000042b0| 45 72 72 6f 72 43 6f 64 | 65 09 65 72 72 20 3d 20 |ErrorCod|e.err = |
|000042c0| 53 5f 4f 4b 3b 0d 09 0d | 09 49 4f 62 6a 65 63 74 |S_OK;...|.IObject|
|000042d0| 49 6e 66 6f 2a 20 4f 62 | 6a 65 63 74 49 6e 66 6f |Info* Ob|jectInfo|
|000042e0| 20 3d 20 47 65 74 4f 62 | 6a 65 63 74 49 6e 66 6f | = GetOb|jectInfo|
|000042f0| 28 52 65 73 52 65 66 4e | 75 6d 2c 20 6e 69 6c 29 |(ResRefN|um, nil)|
|00004300| 3b 0d 09 69 66 20 28 20 | 4f 62 6a 65 63 74 49 6e |;..if ( |ObjectIn|
|00004310| 66 6f 20 29 0d 09 7b 0d | 09 09 65 72 72 20 3d 20 |fo )..{.|..err = |
|00004320| 4f 62 6a 65 63 74 49 6e | 66 6f 2d 3e 47 65 74 43 |ObjectIn|fo->GetC|
|00004330| 6c 61 73 73 49 44 28 6f | 75 74 43 6c 61 73 73 49 |lassID(o|utClassI|
|00004340| 44 29 3b 0d 09 09 4f 62 | 6a 65 63 74 49 6e 66 6f |D);...Ob|jectInfo|
|00004350| 2d 3e 52 65 6c 65 61 73 | 65 28 29 3b 0d 09 7d 0d |->Releas|e();..}.|
|00004360| 09 65 6c 73 65 0d 09 09 | 65 72 72 20 3d 20 45 5f |.else...|err = E_|
|00004370| 46 41 49 4c 3b 0d 09 09 | 0d 09 3a 3a 55 73 65 52 |FAIL;...|..::UseR|
|00004380| 65 73 46 69 6c 65 28 49 | 6e 52 65 73 46 69 6c 65 |esFile(I|nResFile|
|00004390| 29 3b 0d 09 3a 3a 43 6c | 6f 73 65 52 65 73 46 69 |);..::Cl|oseResFi|
|000043a0| 6c 65 28 52 65 73 52 65 | 66 4e 75 6d 29 3b 0d 0d |le(ResRe|fNum);..|
|000043b0| 09 72 65 74 75 72 6e 20 | 65 72 72 3b 0d 09 0d 23 |.return |err;...#|
|000043c0| 65 6c 73 65 0d 09 28 2a | 6f 75 74 43 6c 61 73 73 |else..(*|outClass|
|000043d0| 49 44 29 20 3d 20 43 4c | 53 49 44 5f 6f 63 78 3b |ID) = CL|SID_ocx;|
|000043e0| 0d 09 72 65 74 75 72 6e | 20 53 5f 4f 4b 3b 0d 23 |..return| S_OK;.#|
|000043f0| 65 6e 64 69 66 0d 09 0d | 7d 0d 0d 2f 2f 0d 2f 2f |endif...|}..//.//|
|00004400| 20 20 47 65 74 4f 62 6a | 65 63 74 49 6e 66 6f 0d | GetObj|ectInfo.|
|00004410| 2f 2f 0d 49 4f 62 6a 65 | 63 74 49 6e 66 6f 2a 20 |//.IObje|ctInfo* |
|00004420| 47 65 74 4f 62 6a 65 63 | 74 49 6e 66 6f 28 49 6e |GetObjec|tInfo(In|
|00004430| 74 31 36 20 69 6e 52 65 | 73 52 65 66 4e 75 6d 2c |t16 inRe|sRefNum,|
|00004440| 20 49 6e 74 31 36 2a 20 | 6f 75 74 4d 69 6d 65 52 | Int16* |outMimeR|
|00004450| 65 73 49 44 29 0d 7b 0d | 09 49 4f 62 6a 65 63 74 |esID).{.|.IObject|
|00004460| 49 6e 66 6f 2a 09 4f 62 | 6a 65 63 74 49 6e 66 6f |Info*.Ob|jectInfo|
|00004470| 20 3d 20 6e 69 6c 3b 0d | 09 0d 23 69 66 64 65 66 | = nil;.|..#ifdef|
|00004480| 20 46 45 41 54 55 52 45 | 5f 4f 42 4a 45 43 54 49 | FEATURE|_OBJECTI|
|00004490| 4e 46 4f 09 0d 09 2f 2f | 20 49 6e 73 74 61 6e 74 |NFO...//| Instant|
|000044a0| 69 61 74 65 20 61 20 43 | 4f 62 6a 65 63 74 44 65 |iate a C|ObjectDe|
|000044b0| 73 63 20 66 6f 72 20 4f | 62 6a 65 63 74 20 49 6e |sc for O|bject In|
|000044c0| 66 6f 20 61 63 63 65 73 | 73 0d 09 43 4f 62 6a 65 |fo acces|s..CObje|
|000044d0| 63 74 44 65 73 63 2a 20 | 4f 62 6a 65 63 74 55 6e |ctDesc* |ObjectUn|
|000044e0| 6b 20 3d 20 6e 65 77 20 | 43 4f 62 6a 65 63 74 44 |k = new |CObjectD|
|000044f0| 65 73 63 28 69 6e 52 65 | 73 52 65 66 4e 75 6d 29 |esc(inRe|sRefNum)|
|00004500| 3b 0d 09 69 66 20 28 20 | 4f 62 6a 65 63 74 55 6e |;..if ( |ObjectUn|
|00004510| 6b 20 29 0d 09 7b 0d 09 | 09 69 66 20 28 20 6f 75 |k )..{..|.if ( ou|
|00004520| 74 4d 69 6d 65 52 65 73 | 49 44 20 29 0d 09 09 09 |tMimeRes|ID )....|
|00004530| 2a 6f 75 74 4d 69 6d 65 | 52 65 73 49 44 20 3d 20 |*outMime|ResID = |
|00004540| 4f 62 6a 65 63 74 55 6e | 6b 2d 3e 47 65 74 4d 69 |ObjectUn|k->GetMi|
|00004550| 6d 65 52 65 73 49 44 28 | 29 3b 0d 0d 09 09 4f 62 |meResID(|);....Ob|
|00004560| 6a 65 63 74 55 6e 6b 2d | 3e 51 75 65 72 79 49 6e |jectUnk-|>QueryIn|
|00004570| 74 65 72 66 61 63 65 28 | 49 49 44 5f 49 4f 62 6a |terface(|IID_IObj|
|00004580| 65 63 74 49 6e 66 6f 2c | 20 26 4f 62 6a 65 63 74 |ectInfo,| &Object|
|00004590| 49 6e 66 6f 29 3b 0d 09 | 09 4f 62 6a 65 63 74 55 |Info);..|.ObjectU|
|000045a0| 6e 6b 2d 3e 52 65 6c 65 | 61 73 65 28 29 3b 0d 09 |nk->Rele|ase();..|
|000045b0| 7d 0d 23 65 6c 73 65 0d | 09 23 70 72 61 67 6d 61 |}.#else.|.#pragma|
|000045c0| 20 75 6e 75 73 65 64 28 | 69 6e 52 65 73 52 65 66 | unused(|inResRef|
|000045d0| 4e 75 6d 29 0d 09 2a 6f | 75 74 4d 69 6d 65 52 65 |Num)..*o|utMimeRe|
|000045e0| 73 49 44 20 3d 20 31 32 | 38 3b 0d 23 65 6e 64 69 |sID = 12|8;.#endi|
|000045f0| 66 0d 09 0d 09 72 65 74 | 75 72 6e 20 4f 62 6a 65 |f....ret|urn Obje|
|00004600| 63 74 49 6e 66 6f 3b 0d | 7d 09 0d 0d 2f 2f 0d 2f |ctInfo;.|}...//./|
|00004610| 2f 20 20 47 65 74 52 65 | 67 69 73 74 72 79 4e 61 |/ GetRe|gistryNa|
|00004620| 6d 65 73 0d 2f 2f 0d 2f | 2f 20 20 50 75 6c 6c 73 |mes.//./|/ Pulls|
|00004630| 20 74 68 65 20 72 65 67 | 69 73 74 72 79 20 6e 61 | the reg|istry na|
|00004640| 6d 65 73 20 66 72 6f 6d | 20 74 68 65 20 72 65 73 |mes from| the res|
|00004650| 6f 75 72 63 65 20 66 6f | 72 6b 20 6f 66 20 61 20 |ource fo|rk of a |
|00004660| 63 6f 6e 74 72 6f 6c 0d | 2f 2f 0d 41 58 45 72 72 |control.|//.AXErr|
|00004670| 6f 72 43 6f 64 65 20 47 | 65 74 52 65 67 69 73 74 |orCode G|etRegist|
|00004680| 72 79 4e 61 6d 65 73 28 | 49 6e 74 31 36 20 69 6e |ryNames(|Int16 in|
|00004690| 52 65 73 52 65 66 4e 75 | 6d 2c 20 63 68 61 72 2a |ResRefNu|m, char*|
|000046a0| 20 6f 75 74 43 6c 61 73 | 73 49 44 2c 20 63 68 61 | outClas|sID, cha|
|000046b0| 72 2a 20 6f 75 74 50 72 | 6f 67 49 44 2c 0d 09 09 |r* outPr|ogID,...|
|000046c0| 09 09 09 09 63 68 61 72 | 2a 20 6f 75 74 55 73 65 |....char|* outUse|
|000046d0| 72 4e 61 6d 65 2c 20 63 | 68 61 72 2a 20 6f 75 74 |rName, c|har* out|
|000046e0| 46 72 61 67 4e 61 6d 65 | 2c 20 49 6e 74 31 36 2a |FragName|, Int16*|
|000046f0| 20 6f 75 74 4d 69 6d 65 | 52 65 73 49 44 29 0d 7b | outMime|ResID).{|
|00004700| 0d 23 69 66 64 65 66 20 | 46 45 41 54 55 52 45 5f |.#ifdef |FEATURE_|
|00004710| 4f 42 4a 45 43 54 49 4e | 46 4f 0d 09 49 4f 62 6a |OBJECTIN|FO..IObj|
|00004720| 65 63 74 49 6e 66 6f 2a | 09 4f 62 6a 65 63 74 49 |ectInfo*|.ObjectI|
|00004730| 6e 66 6f 20 3d 20 47 65 | 74 4f 62 6a 65 63 74 49 |nfo = Ge|tObjectI|
|00004740| 6e 66 6f 28 69 6e 52 65 | 73 52 65 66 4e 75 6d 2c |nfo(inRe|sRefNum,|
|00004750| 20 6f 75 74 4d 69 6d 65 | 52 65 73 49 44 29 3b 0d | outMime|ResID);.|
|00004760| 09 0d 09 2f 2f 20 69 66 | 20 77 65 20 63 6f 75 6c |...// if| we coul|
|00004770| 64 20 6e 6f 74 20 67 65 | 74 20 61 63 63 65 73 73 |d not ge|t access|
|00004780| 20 74 6f 20 74 68 65 20 | 6f 62 6a 65 63 74 20 69 | to the |object i|
|00004790| 6e 66 6f 2c 20 62 61 69 | 6c 0d 09 69 66 20 28 20 |nfo, bai|l..if ( |
|000047a0| 21 4f 62 6a 65 63 74 49 | 6e 66 6f 20 29 0d 09 09 |!ObjectI|nfo )...|
|000047b0| 72 65 74 75 72 6e 20 45 | 5f 46 41 49 4c 3b 0d 09 |return E|_FAIL;..|
|000047c0| 0d 09 2f 2f 20 47 65 74 | 20 74 68 65 20 73 74 75 |..// Get| the stu|
|000047d0| 66 66 20 77 65 20 6e 65 | 65 64 20 74 6f 20 64 6f |ff we ne|ed to do|
|000047e0| 20 74 68 65 20 72 65 67 | 69 73 74 72 61 74 69 6f | the reg|istratio|
|000047f0| 6e 0d 09 69 66 20 28 20 | 6f 75 74 43 6c 61 73 73 |n..if ( |outClass|
|00004800| 49 44 20 29 0d 09 09 4f | 62 6a 65 63 74 49 6e 66 |ID )...O|bjectInf|
|00004810| 6f 2d 3e 47 65 74 49 44 | 53 74 72 69 6e 67 28 6b |o->GetID|String(k|
|00004820| 41 58 43 6c 61 73 73 49 | 44 2c 20 32 35 36 2c 20 |AXClassI|D, 256, |
|00004830| 6f 75 74 43 6c 61 73 73 | 49 44 29 3b 0d 09 69 66 |outClass|ID);..if|
|00004840| 20 28 20 6f 75 74 50 72 | 6f 67 49 44 20 29 0d 09 | ( outPr|ogID )..|
|00004850| 09 4f 62 6a 65 63 74 49 | 6e 66 6f 2d 3e 47 65 74 |.ObjectI|nfo->Get|
|00004860| 49 44 53 74 72 69 6e 67 | 28 6b 41 58 50 72 6f 67 |IDString|(kAXProg|
|00004870| 49 44 2c 20 32 35 36 2c | 20 6f 75 74 50 72 6f 67 |ID, 256,| outProg|
|00004880| 49 44 29 3b 0d 09 69 66 | 20 28 20 6f 75 74 55 73 |ID);..if| ( outUs|
|00004890| 65 72 4e 61 6d 65 20 29 | 0d 09 09 4f 62 6a 65 63 |erName )|...Objec|
|000048a0| 74 49 6e 66 6f 2d 3e 47 | 65 74 49 44 53 74 72 69 |tInfo->G|etIDStri|
|000048b0| 6e 67 28 6b 41 58 55 73 | 65 72 4e 61 6d 65 2c 20 |ng(kAXUs|erName, |
|000048c0| 32 35 36 2c 20 6f 75 74 | 55 73 65 72 4e 61 6d 65 |256, out|UserName|
|000048d0| 29 3b 0d 09 69 66 20 28 | 20 6f 75 74 46 72 61 67 |);..if (| outFrag|
|000048e0| 4e 61 6d 65 20 29 0d 09 | 09 4f 62 6a 65 63 74 49 |Name )..|.ObjectI|
|000048f0| 6e 66 6f 2d 3e 47 65 74 | 49 44 53 74 72 69 6e 67 |nfo->Get|IDString|
|00004900| 28 6b 41 58 46 72 61 67 | 4e 61 6d 65 2c 20 32 35 |(kAXFrag|Name, 25|
|00004910| 36 2c 20 6f 75 74 46 72 | 61 67 4e 61 6d 65 29 3b |6, outFr|agName);|
|00004920| 0d 09 0d 09 2f 2f 20 52 | 65 6c 65 61 73 65 20 74 |....// R|elease t|
|00004930| 68 65 20 72 65 66 65 72 | 65 6e 63 65 73 20 6f 6e |he refer|ences on|
|00004940| 20 74 68 65 20 4f 62 6a | 65 63 74 44 65 73 63 20 | the Obj|ectDesc |
|00004950| 6f 62 6a 65 63 74 0d 09 | 4f 62 6a 65 63 74 49 6e |object..|ObjectIn|
|00004960| 66 6f 2d 3e 52 65 6c 65 | 61 73 65 28 29 3b 0d 23 |fo->Rele|ase();.#|
|00004970| 65 6c 73 65 0d 23 70 72 | 61 67 6d 61 20 75 6e 75 |else.#pr|agma unu|
|00004980| 73 65 64 28 69 6e 52 65 | 73 52 65 66 4e 75 6d 2c |sed(inRe|sRefNum,|
|00004990| 20 6f 75 74 4d 69 6d 65 | 52 65 73 49 44 29 0d 0d | outMime|ResID)..|
|000049a0| 09 69 66 20 28 20 6f 75 | 74 43 6c 61 73 73 49 44 |.if ( ou|tClassID|
|000049b0| 20 29 0d 09 09 73 74 72 | 63 70 79 28 6f 75 74 43 | )...str|cpy(outC|
|000049c0| 6c 61 73 73 49 44 2c 20 | 6b 4f 43 58 43 4c 53 49 |lassID, |kOCXCLSI|
|000049d0| 44 29 3b 0d 09 69 66 20 | 28 20 6f 75 74 50 72 6f |D);..if |( outPro|
|000049e0| 67 49 44 20 29 0d 23 69 | 66 64 65 66 20 6b 4f 43 |gID ).#i|fdef kOC|
|000049f0| 58 50 72 6f 67 49 44 0d | 09 09 73 74 72 63 70 79 |XProgID.|..strcpy|
|00004a00| 28 6f 75 74 50 72 6f 67 | 49 44 2c 20 6b 4f 43 58 |(outProg|ID, kOCX|
|00004a10| 50 72 6f 67 49 44 29 3b | 0d 23 65 6c 73 65 0d 09 |ProgID);|.#else..|
|00004a20| 09 28 2a 6f 75 74 50 72 | 6f 67 49 44 29 20 3d 20 |.(*outPr|ogID) = |
|00004a30| 30 3b 0d 23 65 6e 64 69 | 66 0d 09 69 66 20 28 20 |0;.#endi|f..if ( |
|00004a40| 6f 75 74 55 73 65 72 4e | 61 6d 65 20 29 0d 09 09 |outUserN|ame )...|
|00004a50| 73 74 72 63 70 79 28 6f | 75 74 55 73 65 72 4e 61 |strcpy(o|utUserNa|
|00004a60| 6d 65 2c 20 6b 4f 43 58 | 46 75 6c 6c 55 73 65 72 |me, kOCX|FullUser|
|00004a70| 54 79 70 65 4e 61 6d 65 | 29 3b 0d 09 69 66 20 28 |TypeName|);..if (|
|00004a80| 20 6f 75 74 46 72 61 67 | 4e 61 6d 65 20 29 0d 09 | outFrag|Name )..|
|00004a90| 09 73 74 72 63 70 79 28 | 6f 75 74 46 72 61 67 4e |.strcpy(|outFragN|
|00004aa0| 61 6d 65 2c 20 6b 4f 43 | 58 46 72 61 67 4e 61 6d |ame, kOC|XFragNam|
|00004ab0| 65 29 3b 0d 23 65 6e 64 | 69 66 0d 09 0d 09 72 65 |e);.#end|if....re|
|00004ac0| 74 75 72 6e 20 53 5f 4f | 4b 3b 20 0d 7d 0d 0d 48 |turn S_O|K; .}..H|
|00004ad0| 61 6e 64 6c 65 20 47 65 | 74 44 6c 6c 54 6f 70 4d |andle Ge|tDllTopM|
|00004ae0| 61 70 48 64 6c 28 76 6f | 69 64 29 0d 7b 0d 09 72 |apHdl(vo|id).{..r|
|00004af0| 65 74 75 72 6e 20 44 6c | 6c 44 61 74 61 2e 54 6f |eturn Dl|lData.To|
|00004b00| 70 4d 61 70 48 64 6c 3b | 0d 7d 0d 0d 00 00 00 00 |pMapHdl;|.}......|
|00004b10| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b20| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b30| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b40| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b50| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004b80| 00 00 01 00 00 00 01 7c | 00 00 00 7c 00 00 00 5e |.......||...|...^|
|00004b90| 00 00 00 21 00 00 00 00 | 00 00 03 a2 ff ff ff ff |...!....|........|
|00004ba0| 00 00 03 d8 ff ff ff ff | ff ff ff ff 00 00 00 22 |........|......."|
|00004bb0| 0c 44 6c 6c 45 6e 74 72 | 79 2e 63 70 70 72 02 00 |.DllEntr|y.cppr..|
|00004bc0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00004bd0| 00 00 50 61 72 74 53 49 | 54 21 00 00 00 00 00 00 |..PartSI|T!......|
|00004be0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004bf0| 00 00 b0 56 8e 1d 00 00 | 00 00 00 00 01 da 04 80 |...V....|........|
|00004c00| 00 00 00 25 00 00 00 00 | 00 00 03 a2 ff ff ff ff |...%....|........|
|00004c10| 00 00 04 48 ff ff ff ff | ff ff ff ff 00 00 00 26 |...H....|.......&|
|00004c20| 00 00 00 00 00 00 07 cd | ff ff ff ff 00 00 01 1c |........|........|
|00004c30| 00 00 04 9c 00 00 04 b8 | 00 00 00 27 00 00 00 00 |........|...'....|
|00004c40| 00 00 03 a2 ff ff ff ff | 00 00 04 80 ff ff ff ff |........|........|
|00004c50| ff ff ff ff 00 00 00 28 | 00 00 00 00 00 00 07 ce |.......(|........|
|00004c60| ff ff ff ff 00 00 01 1c | 00 00 04 d4 00 00 04 f0 |........|........|
|00004c70| 00 00 00 29 00 00 00 00 | 00 00 03 a2 ff ff ff ff |...)....|........|
|00004c80| 00 00 00 1e 00 5a 00 04 | 02 ed 02 63 00 5a 00 04 |.....Z..|...c.Z..|
|00004c90| 02 ed 02 63 00 00 00 00 | 00 00 00 00 00 00 00 00 |...c....|........|
|00004ca0| 00 00 00 00 00 48 00 09 | 4d 6f 6e 61 63 6f 00 00 |.....H..|Monaco..|
|00004cb0| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004cc0| 00 00 00 00 00 00 00 00 | 00 02 00 04 00 29 00 03 |........|.....)..|
|00004cd0| 02 ec 02 7b 00 29 00 03 | 02 ec 02 7b b0 0d 0c 3b |...{.)..|...{...;|
|00004ce0| 00 00 3a 7e 00 00 3a 7e | 00 00 38 51 01 00 00 00 |..:~..:~|..8Q....|
|00004cf0| 00 02 00 00 00 00 00 04 | 00 01 00 01 00 00 01 00 |........|........|
|00004d00| 00 00 01 7c 00 00 00 7c | 00 00 00 5e 02 dd bd 24 |...|...||...^...$|
|00004d10| 2d 2c 00 00 00 1c 00 5e | 00 01 4d 50 53 52 00 02 |-,.....^|..MPSR..|
|00004d20| 00 12 4d 57 42 42 00 00 | 00 36 03 f0 ff ff 00 00 |..MWBB..|.6......|
|00004d30| 00 00 00 00 00 00 03 ed | ff ff 00 00 00 22 00 00 |........|....."..|
|00004d40| 00 00 03 ef ff ff 00 00 | 00 6e 00 00 00 00 03 f0 |........|.n......|
|00004d50| ff ff 00 00 00 74 00 00 | 00 00 00 00 00 00 00 00 |.....t..|........|
|00004d60| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
|00004d70| 00 00 00 00 00 00 00 00 | 00 00 00 00 00 00 00 00 |........|........|
+--------+-------------------------+-------------------------+--------+--------+